From e4f49c4ba152432d2b70f7fdd7c6bb0dcd351d1c Mon Sep 17 00:00:00 2001 From: buliabyak Date: Wed, 17 Jan 2007 22:35:47 +0000 Subject: [PATCH] safety check --- src/filter-chemistry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.30.2