From 0cda972429abd693b639301487aaf7a8c0722b55 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Wed, 6 Feb 2008 20:19:45 +0000 Subject: [PATCH] fix 189661 --- src/widgets/toolbox.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"), ("") ); -- 2.30.2