allow NULL state in g_simple_action_new_stateful

as an undocumented feature
This commit is contained in:
Ryan Lortie 2011-06-29 12:28:15 +01:00 committed by Javier Jardon
parent 5ff65d8695
commit 695a9a7993

View File

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