gsignal: add assert on closure invalidate path

It's theoretically possible that we could have a case where this would
actually return NULL, but it's difficult to imagine a valid program that
would contain such a case.

Add an explicit assert here to quiet up static analysis.

See the bug for more discussion.

Coverity CID: 1159477

https://bugzilla.gnome.org/show_bug.cgi?id=730296
This commit is contained in:
Ryan Lortie 2014-06-06 12:15:22 -04:00 committed by Philip Withnall
parent ed78f30c5e
commit c64b6da33c

View File

@ -3804,6 +3804,8 @@ invalid_closure_notify (gpointer instance,
SIGNAL_LOCK ();
handler = handler_lookup (instance, 0, closure, &signal_id);
/* See https://bugzilla.gnome.org/show_bug.cgi?id=730296 for discussion about this... */
g_assert (handler != NULL);
g_assert (handler->closure == closure);
handler->sequential_number = 0;