[gtk+] Avoid calling gtk_widget_is_visible(NULL) in _gtk_notebook_get_tab_flags().



commit ac61edb9fce0cbd1de6fcce6b76bbabfd2edaef1
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sat Jan 15 21:34:49 2011 +0900

    Avoid calling gtk_widget_is_visible(NULL) in _gtk_notebook_get_tab_flags().
    
    The tab can be NULL here when GtkNotebook:show-tabs is FALSE.

 gtk/gtknotebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 0d9d9fa..e94518d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -1901,7 +1901,7 @@ _gtk_notebook_get_tab_flags (GtkNotebook     *notebook,
     {
       GtkNotebookPage *p = pages->data;
 
-      if (!gtk_widget_get_visible (p->tab_label))
+      if (!p->tab_label || !gtk_widget_get_visible (p->tab_label))
         continue;
 
       i++;



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