summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2007-09-02 07:38:52 +0000
committerjoncruz <joncruz@users.sourceforge.net>2007-09-02 07:38:52 +0000
commit39eff7fd9ebce9fe05083fb1ac917f7ce9d1c84a (patch)
tree64aefc604bb3cc867bb9207c1898067305478462 /src
parentUpdate icons: The Inkscape logo has been re-aligned by Andy Fitzsimon. (diff)
downloadinkscape-39eff7fd9ebce9fe05083fb1ac917f7ce9d1c84a.tar.gz
inkscape-39eff7fd9ebce9fe05083fb1ac917f7ce9d1c84a.zip
Ensure active unit member pointer is always initialized, fixes 1784559
(bzr r3661)
Diffstat (limited to 'src')
-rw-r--r--src/helper/unit-tracker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/helper/unit-tracker.cpp b/src/helper/unit-tracker.cpp
index 989be2400..93f5bfee1 100644
--- a/src/helper/unit-tracker.cpp
+++ b/src/helper/unit-tracker.cpp
@@ -69,6 +69,8 @@ void UnitTracker::setBase( guint bases )
gint count = gtk_tree_model_iter_n_children( GTK_TREE_MODEL(_store), 0 );
if ( (count > 0) && (_active > count) ) {
_setActive( count - 1 );
+ } else {
+ _setActive( _active );
}
}
@@ -186,7 +188,7 @@ void UnitTracker::_adjustmentFinalized( GObject *where_the_object_was )
void UnitTracker::_setActive( gint active )
{
- if ( active != _active ) {
+ if ( active != _active || (_activeUnit == 0) ) {
gint oldActive = _active;
GtkTreeIter iter;