forked from AuroraMiddleware/gtk
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:
parent
0bb2567ff5
commit
d8a40c4587
@ -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))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user