mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-26 02:48:54 +02:00
gsignal: Warn if g_signal_lookup() is called on an invalid signal name
And add a test for it. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
@@ -1331,6 +1331,9 @@ g_signal_lookup (const gchar *name,
|
||||
else if (!g_type_class_peek (itype))
|
||||
g_warning (G_STRLOC ": unable to look up signal \"%s\" of unloaded type '%s'",
|
||||
name, g_type_name (itype));
|
||||
else if (!is_valid_signal_name (name))
|
||||
g_warning (G_STRLOC ": unable to look up invalid signal name \"%s\" on type '%s'",
|
||||
name, g_type_name (itype));
|
||||
}
|
||||
|
||||
return signal_id;
|
||||
|
Reference in New Issue
Block a user