[gtk+/wip/baedert/drawing: 28/241] notebook: Fix crash when dragging a tab



commit ff1f1865a843fa34ee1add66b29f3b7efecfa34d
Author: Timm Bäder <mail baedert org>
Date:   Wed May 3 11:21:29 2017 +0200

    notebook: Fix crash when dragging a tab
    
    gtk_gesture_get_last_event can return NULL, so guard against that.

 gtk/gtknotebook.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 94d62a4..3aba5ba 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2786,6 +2786,9 @@ gtk_notebook_gesture_released (GtkGestureMultiPress *gesture,
   button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
   event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
 
+  if (!event)
+    return;
+
   if (event->type != GDK_BUTTON_RELEASE)
     return;
 


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