[gtk+/wip/baedert/drawing: 44/396] notebook: Fix crash when dragging a tab
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/drawing: 44/396] notebook: Fix crash when dragging a tab
- Date: Wed, 19 Jul 2017 11:14:03 +0000 (UTC)
commit 3d107141af62dc64e2f22d38bf66ee03484866f4
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 e9223e0..9073f81 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]