From b73e53f5776507427e1475ae184daf2ab969e3c2 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 29 Jun 2011 17:19:38 +0100 Subject: [PATCH] parameter guards for GSimpleAction constructors --- gio/gsimpleaction.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c index d6cf423b2..8f448d62c 100644 --- a/gio/gsimpleaction.c +++ b/gio/gsimpleaction.c @@ -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);