parameter guards for GSimpleAction constructors

This commit is contained in:
Ryan Lortie 2011-06-29 17:19:38 +01:00 committed by Robert Ancell
parent bde41dacf7
commit b73e53f577

View File

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