From ea5d79d1fdce6468542d5071d4fe032c309da14f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 17 Jul 2015 18:42:24 -0400 Subject: [PATCH] inspector: Avoid a NULL deref --- gtk/inspector/prop-editor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index 40a39a0dd6..75a9f06760 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -1179,7 +1179,7 @@ attribute_editor (GObject *object, box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10); gtk_container_add (GTK_CONTAINER (box), gtk_label_new (_("Model:"))); - text = g_strdup_printf (_("%p (%s)"), model, g_type_name (G_TYPE_FROM_INSTANCE (model))); + text = g_strdup_printf (_("%p (%s)"), model, model ? g_type_name (G_TYPE_FROM_INSTANCE (model)) : "null" ); gtk_container_add (GTK_CONTAINER (box), gtk_label_new (text)); g_free (text); button = gtk_button_new_with_label (_("Properties"));