diff options
author | Benjamin Otte <otte@redhat.com> | 2018-09-19 04:28:09 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2018-09-19 04:31:29 +0200 |
commit | be2609a2715e0319c8e2c0ed42cab4be74b1cf57 (patch) | |
tree | bbe969bae6f08fc84ecc2d002dbc8bb3fea3a008 | |
parent | 5bf009a203000ee2d5ddd8b66cd855197d66c8e5 (diff) | |
download | gtk+-be2609a2715e0319c8e2c0ed42cab4be74b1cf57.tar.gz |
inspector: Handle case where there's no default application
-rw-r--r-- | gtk/inspector/object-tree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/inspector/object-tree.c b/gtk/inspector/object-tree.c index ff2d0d060e..8df104f86b 100644 --- a/gtk/inspector/object-tree.c +++ b/gtk/inspector/object-tree.c @@ -1113,11 +1113,14 @@ create_root_model (void) GtkFilterListModel *filter; GtkFlattenListModel *flatten; GListStore *list, *special; + gpointer item; list = g_list_store_new (G_TYPE_LIST_MODEL); special = g_list_store_new (G_TYPE_OBJECT); - g_list_store_append (special, g_application_get_default ()); + item = g_application_get_default (); + if (item) + g_list_store_append (special, item); g_list_store_append (special, gtk_settings_get_default ()); g_list_store_append (list, special); g_object_unref (special); |