[gtk+] gtknotebook: Fix a potential NULL pointer dereference



commit c7f5f10853b3edeabcd4a4374417afa8e54d55a0
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Wed Nov 20 17:32:32 2013 +0000

    gtknotebook: Fix a potential NULL pointer dereference
    
    Found by scan-build.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712760

 gtk/gtknotebook.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 3de4692..9217f12 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2637,7 +2637,7 @@ gtk_notebook_draw (GtkWidget *widget,
       }
     }
 
-  if (priv->operation == DRAG_OPERATION_REORDER &&
+  if (priv->cur_page && priv->operation == DRAG_OPERATION_REORDER &&
       gtk_cairo_should_draw_window (cr, priv->drag_window))
     {
       cairo_save (cr);


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