[gtk+/gtk-3-14] GtkNotebook: Be a bit more safe against cur_page being NULL



commit 4d66aeab4eb985a1dbf26353ac7fe44e2980378e
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Dec 22 10:52:54 2014 -0500

    GtkNotebook: Be a bit more safe against cur_page being NULL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=477454

 gtk/gtknotebook.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index acb90e5..12d7d80 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -3239,7 +3239,6 @@ gtk_notebook_button_release (GtkWidget      *widget,
 {
   GtkNotebook *notebook;
   GtkNotebookPrivate *priv;
-  GtkNotebookPage *page;
 
   if (event->type != GDK_BUTTON_RELEASE)
     return FALSE;
@@ -3247,10 +3246,9 @@ gtk_notebook_button_release (GtkWidget      *widget,
   notebook = GTK_NOTEBOOK (widget);
   priv = notebook->priv;
 
-  page = priv->cur_page;
-
   if (!priv->during_detach &&
-      page->reorderable &&
+      priv->cur_page &&
+      priv->cur_page->reorderable &&
       event->button == priv->pressed_button)
     gtk_notebook_stop_reorder (notebook);
 


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