[gtk+] GtkActionHelper: Avoid null deref in debug code



commit 363e791d08996e29231897079bd66da87140fea3
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Jul 17 18:38:01 2015 -0400

    GtkActionHelper: Avoid null deref in debug code

 gtk/gtkactionhelper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkactionhelper.c b/gtk/gtkactionhelper.c
index 50060ee..2c28627 100644
--- a/gtk/gtkactionhelper.c
+++ b/gtk/gtkactionhelper.c
@@ -415,7 +415,7 @@ gtk_action_helper_set_action_name (GtkActionHelper *helper,
     return;
 
   GTK_NOTE(ACTIONS,
-           if (!strchr (action_name, '.'))
+           if (action_name == NULL || !strchr (action_name, '.'))
              g_message ("actionhelper: action name %s doesn't look like 'app.' or 'win.' "
                         "which means that it will probably not work properly.", action_name));
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]