[gtk+] GtkRecentChooserMenu: avoid accessing a NULL action



commit 909e82a2a6b8bc0aad12652472df174eec02c79c
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]