gdkdragsource: Ensure button >= 1

So the left shift later doesn't overflow.
This commit is contained in:
Timm Bäder 2017-03-21 16:06:13 +01:00
parent 1aa37687be
commit f4a24babd4

View File

@ -58,6 +58,8 @@ gtk_drag_source_gesture_begin (GtkGesture *gesture,
else
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
g_assert (button >= 1);
if (!site->start_button_mask ||
!(site->start_button_mask & (GDK_BUTTON1_MASK << (button - 1))))
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_DENIED);