mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-02 17:26:17 +01:00
girnode: Simplify NULL node handling
All of the indications in the surrounding code are that `node` should never be `NULL`, but the error handling for it did actually allow it to be `NULL` iff its `parent` was also `NULL`. That made scan-build (kind of legitimately) warn about `NULL` pointer dereferences of `node`. Avoid that by unambiguously using an assertion to prevent `NULL` nodes. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
ad0532f2bf
commit
3c6c60611f
@ -594,8 +594,7 @@ gi_ir_node_get_full_size_internal (GIIrNode *parent,
|
||||
GList *l;
|
||||
size_t size, n;
|
||||
|
||||
if (node == NULL && parent != NULL)
|
||||
g_error ("Caught NULL node, parent=%s", parent->name);
|
||||
g_assert (node != NULL);
|
||||
|
||||
g_debug ("node %p type '%s'", node,
|
||||
gi_ir_node_type_to_string (node->type));
|
||||
|
Loading…
Reference in New Issue
Block a user