From: buliabyak Date: Wed, 17 Jan 2007 22:35:47 +0000 (+0000) Subject: safety check X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e4f49c4ba152432d2b70f7fdd7c6bb0dcd351d1c;p=inkscape.git safety check --- diff --git a/src/filter-chemistry.cpp b/src/filter-chemistry.cpp index 100caefbe..2c0a3636f 100644 --- a/src/filter-chemistry.cpp +++ b/src/filter-chemistry.cpp @@ -38,8 +38,8 @@ new_filter_gaussian_blur (SPDocument *document, gdouble radius, double expansion repr = sp_repr_new("svg:filter"); repr->setAttribute("inkscape:collect", "always"); - double rx = radius * (expansion / expansionY); - double ry = radius * (expansion / expansionX); + double rx = radius * (expansionY != 0? (expansion / expansionY) : 1); + double ry = radius * (expansionX != 0? (expansion / expansionX) : 1); if (width != 0 && height != 0 && (2 * rx > width * 0.1 || 2 * ry > height * 0.1)) { // If not within the default 10% margin (see