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



commit 7aaec9aa5701f14423c5ac928e6631f380f2b6b0
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]