[gtk+] notebook: Fix crash when dragging a tab
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: Fix crash when dragging a tab
- Date: Thu, 20 Jul 2017 01:31:30 +0000 (UTC)
commit 8aefa0976584055b397a5ecffc058249590be07a
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]