GtkRecentChooserMenu: avoid accessing a NULL action

When the GtkActivatable sets the related action, the activatable
properties are sync'ed. In this case the null check is important
to avoid updating from a NULL action.
This commit is contained in:
Tristan Van Berkom
2013-04-06 18:42:19 +09:00
parent fbb9447785
commit 909e82a2a6

View File

@ -1202,6 +1202,9 @@ static void
gtk_recent_chooser_sync_action_properties (GtkActivatable *activatable,
GtkAction *action)
{
if (!action)
return;
gtk_widget_set_sensitive (GTK_WIDGET (activatable), gtk_action_is_sensitive (action));
_gtk_recent_chooser_sync_action_properties (activatable, action);