From: buliabyak Date: Wed, 6 Feb 2008 20:19:45 +0000 (+0000) Subject: fix 189661 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=0cda972429abd693b639301487aaf7a8c0722b55;p=inkscape.git fix 189661 --- diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index fcf437288..eb4b404e8 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -5280,7 +5280,9 @@ static void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* main // Create the units menu. UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); - tracker->setActiveUnit(sp_unit_get_by_abbreviation(prefs_get_string_attribute("tools.paintbucket", "offsetunits"))); + const gchar *stored_unit = prefs_get_string_attribute("tools.paintbucket", "offsetunits"); + if (stored_unit) + tracker->setActiveUnit(sp_unit_get_by_abbreviation(stored_unit)); g_object_set_data( holder, "tracker", tracker ); { GtkAction* act = tracker->createAction( "PaintbucketUnitsAction", _("Units"), ("") );