inspector: Avoid a NULL deref

Coverity pointed out that getting a class name requires
dereferencing the pointer, so only don't do it if it is NULL.
This commit is contained in:
Matthias Clasen 2015-07-17 19:52:52 -04:00
parent 0bb2567ff5
commit d8a40c4587

View File

@ -564,7 +564,10 @@ gtk_inspector_object_tree_append_object (GtkInspectorObjectTree *wt,
else
mapped = TRUE;
class_name = G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (object));
if (G_OBJECT (object)
class_name = G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (object));
else
class_name = "";
if (GTK_IS_WIDGET (object))
{