From c64b6da33c4d2401dc01329dcac7b32e2274fbfd Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Fri, 6 Jun 2014 12:15:22 -0400 Subject: [PATCH] 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 --- gobject/gsignal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gobject/gsignal.c b/gobject/gsignal.c index 38f528eb7..b22dfcca8 100644 --- a/gobject/gsignal.c +++ b/gobject/gsignal.c @@ -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;