gapplication: reject actions without names

https://bugzilla.gnome.org/show_bug.cgi?id=756134
This commit is contained in:
Lars Uebernickel
2015-10-07 15:49:05 +02:00
parent 863bffdac7
commit ee718d3526
3 changed files with 34 additions and 0 deletions

View File

@@ -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)