From 695a9a799355713dc6df089801b7f67a010e3b13 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 29 Jun 2011 12:28:15 +0100 Subject: [PATCH] allow NULL state in g_simple_action_new_stateful as an undocumented feature --- gio/gsimpleaction.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gio/gsimpleaction.c b/gio/gsimpleaction.c index 526e02f..915a2e6 100644 --- a/gio/gsimpleaction.c +++ b/gio/gsimpleaction.c @@ -492,7 +492,8 @@ g_simple_action_new_stateful (const gchar *name, "parameter-type", parameter_type, NULL); - simple->state = g_variant_ref_sink (state); + if (state) + simple->state = g_variant_ref_sink (state); return simple; } -- 2.7.4