summaryrefslogtreecommitdiff
path: root/tests/testentrycompletion.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-10-31 18:26:49 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-10-31 18:26:49 +0000
commitd9f91432c9e5d850332abdad0c6b427e8cd25903 (patch)
tree97ba666bb319039bd0c9b8a082adf853d06bf95a /tests/testentrycompletion.c
parent463c26358cdc1feacc50b067e65694210a4c87ae (diff)
downloadgtk+-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.c6
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);
}
}