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



commit eb5fe09b0de10304f36fc89a923bda53129036ed
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 88bf788..02ec61d 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -2941,6 +2941,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]