summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3fe18ed)
raw | patch | inline | side by side (parent: 3fe18ed)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 6 Feb 2008 20:19:45 +0000 (20:19 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Wed, 6 Feb 2008 20:19:45 +0000 (20:19 +0000) |
src/widgets/toolbox.cpp | patch | blob | history |
index fcf43728801013084ad7a27f8bcaf9b9bd7d8b24..eb4b404e8f1a0f066a328ced7f899790ead4e093 100644 (file)
--- 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"), ("") );