[gtk+/composite-templates-new] GtkRecentChooserMenu: avoid accessing a NULL action
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/composite-templates-new] GtkRecentChooserMenu: avoid accessing a NULL action
- Date: Sat, 6 Apr 2013 09:46:31 +0000 (UTC)
commit 9d21aee4be34c2c24fd33600c0fc6f8d456edb6e
Author: Tristan Van Berkom <tristanvb openismus com>
Date: Sat Apr 6 18:42:19 2013 +0900
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.
gtk/gtkrecentchoosermenu.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrecentchoosermenu.c b/gtk/gtkrecentchoosermenu.c
index 25dc025..64b3946 100644
--- a/gtk/gtkrecentchoosermenu.c
+++ b/gtk/gtkrecentchoosermenu.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]