summaryrefslogtreecommitdiff
path: root/demos/icon-browser
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-07-29 14:50:10 +0200
committerMatthias Clasen <mclasen@redhat.com>2014-07-29 14:50:10 +0200
commit10412dd34133e7424ec3b124d5138fe01d1d8ff1 (patch)
treec452387a0922e25c636c010b43edd7409e5d4706 /demos/icon-browser
parent73f54716ad2156e0574305eed8393501d66e9202 (diff)
downloadgtk+-10412dd34133e7424ec3b124d5138fe01d1d8ff1.tar.gz
icon-browser: Don't crash on exit
Diffstat (limited to 'demos/icon-browser')
-rw-r--r--demos/icon-browser/iconbrowserwin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/demos/icon-browser/iconbrowserwin.c b/demos/icon-browser/iconbrowserwin.c
index 6bb0684b9c..47c621d44a 100644
--- a/demos/icon-browser/iconbrowserwin.c
+++ b/demos/icon-browser/iconbrowserwin.c
@@ -176,6 +176,9 @@ selected_context_changed (GtkListBox *list, IconBrowserWindow *win)
GtkWidget *label;
row = GTK_WIDGET (gtk_list_box_get_selected_row (list));
+ if (row == NULL)
+ return;
+
label = gtk_bin_get_child (GTK_BIN (row));
win->current_context = g_object_get_data (G_OBJECT (label), "context");
gtk_tree_model_filter_refilter (win->filter_model);