mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-13 07:56:17 +01:00
girnode: Fix a NULL pointer deference if a namespace can’t be found
https://bugzilla.gnome.org/show_bug.cgi?id=711541
This commit is contained in:
parent
67358cdaf4
commit
4dfcf7bc21
@ -1151,6 +1151,10 @@ _g_ir_find_node (GIrTypelibBuild *build,
|
||||
target_name = names[1];
|
||||
}
|
||||
|
||||
/* find_namespace() may return NULL. */
|
||||
if (target_module == NULL)
|
||||
goto done;
|
||||
|
||||
for (l = target_module->entries; l; l = l->next)
|
||||
{
|
||||
GIrNode *node = (GIrNode *)l->data;
|
||||
@ -1162,6 +1166,7 @@ _g_ir_find_node (GIrTypelibBuild *build,
|
||||
}
|
||||
}
|
||||
|
||||
done:
|
||||
g_strfreev (names);
|
||||
|
||||
return return_node;
|
||||
|
Loading…
Reference in New Issue
Block a user