From 46cfa40b072cb16c93532e2c36059ee3ff400830 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Sun, 19 Feb 2012 11:30:57 +0100 Subject: fix crash on non-finite stroke widths Fixed bugs: - https://launchpad.net/bugs/935157 (bzr r10995) --- src/style.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/style.cpp') diff --git a/src/style.cpp b/src/style.cpp index dff13f42f..4244798bf 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -52,6 +52,8 @@ #include #include +#include <2geom/math-utils.h> + using Inkscape::CSSOStringStream; using std::vector; @@ -3276,6 +3278,9 @@ sp_style_read_ilength(SPILength *val, gchar const *str) gchar *e; /** \todo fixme: Move this to standard place (Lauris) */ value = g_ascii_strtod(str, &e); + if ( !IS_FINITE(value) ) { // fix for bug lp:935157 + return; + } if ((gchar const *) e != str) { /** \todo * Allow the number of px per inch to vary (document preferences, -- cgit v1.2.3