diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-06-19 22:47:57 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-06-19 22:47:57 -0400 |
commit | 2fd984987d1f66a01f0667aad461fdea5963af4c (patch) | |
tree | 37c2d7857bbfb3971d333cff4dbc03ba852d8e8f /demos/gtk-demo | |
parent | 76af90767634f5caea622c2abc13d21adb41550c (diff) | |
download | gtk+-2fd984987d1f66a01f0667aad461fdea5963af4c.tar.gz |
gtk-demo: Fix up some warnings
The search entry example was a bit sloppy in cleaning up its
sources, causing warnings.
Diffstat (limited to 'demos/gtk-demo')
-rw-r--r-- | demos/gtk-demo/search_entry.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c index 67a10b5534..8573aa1e89 100644 --- a/demos/gtk-demo/search_entry.c +++ b/demos/gtk-demo/search_entry.c @@ -43,8 +43,11 @@ static gboolean finish_search (GtkButton *button) { show_find_button (); - g_source_remove (search_progress_id); - search_progress_id = 0; + if (search_progress_id) + { + g_source_remove (search_progress_id); + search_progress_id = 0; + } return G_SOURCE_REMOVE; } @@ -71,7 +74,11 @@ static void stop_search (GtkButton *button, gpointer data) { - g_source_remove (finish_search_id); + if (finish_search_id) + { + g_source_remove (finish_search_id); + finish_search_id = 0; + } finish_search (button); } |