mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
gapplication: reject actions without names
https://bugzilla.gnome.org/show_bug.cgi?id=756134
This commit is contained in:
@@ -191,6 +191,13 @@ g_simple_action_group_add_action (GActionMap *action_map,
|
||||
GAction *old_action;
|
||||
|
||||
action_name = g_action_get_name (action);
|
||||
if (action_name == NULL)
|
||||
{
|
||||
g_critical ("The supplied action has no name. You must set the "
|
||||
"GAction:name property when creating an action.");
|
||||
return;
|
||||
}
|
||||
|
||||
old_action = g_hash_table_lookup (simple->priv->table, action_name);
|
||||
|
||||
if (old_action != action)
|
||||
|
Reference in New Issue
Block a user