]> git.donarmstrong.com Git - xournal.git/blobdiff - src/xo-callbacks.c
Fix crashes under GTK+ 2.11.
[xournal.git] / src / xo-callbacks.c
index 2fa9d7c869fbedfc0d26ee1ed2793f7d95994c57..49b3bd17e37158cf0fdc96a10e99a3b3165dcabd 100644 (file)
@@ -2341,6 +2341,8 @@ on_canvas_button_press_event           (GtkWidget       *widget,
   if (!ui.use_xinput && !is_core) return FALSE;
   if (ui.use_xinput && is_core && ui.discard_corepointer) return FALSE;
   if (event->button > 3) return FALSE; // no painting with the mouse wheel!
+  if (event->type != GDK_BUTTON_PRESS) return FALSE; 
+    // double-clicks may have broken axes member (free'd) due to a bug in GDK
   if (!is_core) { 
     // re-get the axis values since Synaptics sends bogus ones
     gdk_device_get_state(event->device, event->window, event->axes, NULL);