diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-10-31 18:26:49 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-31 18:26:49 +0000 |
commit | d9f91432c9e5d850332abdad0c6b427e8cd25903 (patch) | |
tree | 97ba666bb319039bd0c9b8a082adf853d06bf95a /tests/testentrycompletion.c | |
parent | 463c26358cdc1feacc50b067e65694210a4c87ae (diff) | |
download | gtk+-d9f91432c9e5d850332abdad0c6b427e8cd25903.tar.gz |
Don't try to remove stuff from an empty model. (#156575, Christian Persch)
2004-10-31 Matthias Clasen <mclasen@redhat.com>
* tests/testentrycompletion.c (animation_timer): Don't try to
remove stuff from an empty model. (#156575, Christian Persch)
Diffstat (limited to 'tests/testentrycompletion.c')
-rw-r--r-- | tests/testentrycompletion.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c index 0f7a74f761..2ffd1e9e3f 100644 --- a/tests/testentrycompletion.c +++ b/tests/testentrycompletion.c @@ -217,7 +217,7 @@ animation_timer (GtkEntryCompletion *completion) { g_print ("readding model!\n"); - gtk_entry_completion_set_model (completion, GTK_TREE_MODEL(old_store)); + gtk_entry_completion_set_model (completion, GTK_TREE_MODEL (old_store)); g_object_unref (old_store); old_store = NULL; } @@ -237,8 +237,8 @@ animation_timer (GtkEntryCompletion *completion) } else { - gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); - gtk_list_store_remove (store, &iter); + if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter)) + gtk_list_store_remove (store, &iter); } } |