From 10d0b1f3ffc0e1e1c0539b12851b04cea1d57222 Mon Sep 17 00:00:00 2001 From: dvlierop2 Date: Sun, 12 Jul 2009 13:26:17 +0000 Subject: [PATCH] Don't allow the "proportion" parameter of a star to become NaN, because this will lead to a crash (i.e. give a continuity error in 2geom). This occured when snapping both handles of a star to the same grid intersection and subsequently drawing a new star --- src/widgets/toolbox.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 9ac009a84..21b0e97ac 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -2384,8 +2384,10 @@ static void sp_stb_proportion_value_changed( GtkAdjustment *adj, GObject *dataKl SPDesktop *desktop = (SPDesktop *) g_object_get_data( dataKludge, "desktop" ); if (sp_document_get_undo_sensitive(sp_desktop_document(desktop))) { - Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setDouble("/tools/shapes/star/proportion", adj->value); + if (!IS_NAN(adj->value)) { + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + prefs->setDouble("/tools/shapes/star/proportion", adj->value); + } } // quit if run by the attr_changed listener -- 2.30.2