mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
parameter guards for GSimpleAction constructors
This commit is contained in:
parent
bde41dacf7
commit
b73e53f577
@ -485,6 +485,8 @@ g_simple_action_new (const gchar *name,
|
||||
{
|
||||
GSimpleAction *simple;
|
||||
|
||||
g_return_val_if_fail (name != NULL);
|
||||
|
||||
simple = g_object_new (G_TYPE_SIMPLE_ACTION, NULL);
|
||||
simple->name = g_strdup (name);
|
||||
|
||||
@ -520,6 +522,9 @@ g_simple_action_new_stateful (const gchar *name,
|
||||
{
|
||||
GSimpleAction *simple;
|
||||
|
||||
g_return_val_if_fail (name != NULL);
|
||||
g_return_val_if_fail (state != NULL);
|
||||
|
||||
simple = g_object_new (G_TYPE_SIMPLE_ACTION, NULL);
|
||||
simple->name = g_strdup (name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user