Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
allow NULL state in g_simple_action_new_stateful
Browse files Browse the repository at this point in the history
as an undocumented feature
  • Loading branch information
allisonkarlitskaya authored and jjardon committed Jun 29, 2011
1 parent 5ff65d8 commit 695a9a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gio/gsimpleaction.c
Expand Up @@ -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;
}

0 comments on commit 695a9a7

Please sign in to comment.