[glib] parameter guards for GSimpleAction constructors
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] parameter guards for GSimpleAction constructors
- Date: Wed, 29 Jun 2011 16:32:38 +0000 (UTC)
commit b73e53f5776507427e1475ae184daf2ab969e3c2
Author: Ryan Lortie <desrt desrt ca>
Date: Wed Jun 29 17:19:38 2011 +0100
parameter guards for GSimpleAction constructors
gio/gsimpleaction.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c
index d6cf423..8f448d6 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]