projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bde41da
)
parameter guards for GSimpleAction constructors
author
Ryan Lortie
<desrt@desrt.ca>
Wed, 29 Jun 2011 16:19:38 +0000
(17:19 +0100)
committer
Robert Ancell
<robert.ancell@canonical.com>
Wed, 29 Jun 2011 16:32:21 +0000
(17:32 +0100)
gio/gsimpleaction.c
patch
|
blob
|
history
diff --git
a/gio/gsimpleaction.c
b/gio/gsimpleaction.c
index
d6cf423
..
8f448d6
100644
(file)
--- 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);