mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-21 08:28:53 +02:00
parameter guards for GSimpleAction constructors
This commit is contained in:
committed by
Robert Ancell
parent
bde41dacf7
commit
b73e53f577
@@ -485,6 +485,8 @@ g_simple_action_new (const gchar *name,
|
|||||||
{
|
{
|
||||||
GSimpleAction *simple;
|
GSimpleAction *simple;
|
||||||
|
|
||||||
|
g_return_val_if_fail (name != NULL);
|
||||||
|
|
||||||
simple = g_object_new (G_TYPE_SIMPLE_ACTION, NULL);
|
simple = g_object_new (G_TYPE_SIMPLE_ACTION, NULL);
|
||||||
simple->name = g_strdup (name);
|
simple->name = g_strdup (name);
|
||||||
|
|
||||||
@@ -520,6 +522,9 @@ g_simple_action_new_stateful (const gchar *name,
|
|||||||
{
|
{
|
||||||
GSimpleAction *simple;
|
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 = g_object_new (G_TYPE_SIMPLE_ACTION, NULL);
|
||||||
simple->name = g_strdup (name);
|
simple->name = g_strdup (name);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user