diff options
Diffstat (limited to 'vcl/unx/gtk/window/gtksalframe.cxx')
-rw-r--r-- | vcl/unx/gtk/window/gtksalframe.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 5944b6bdc2ea..6280d3758a99 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -3540,15 +3540,18 @@ void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gpointer frame) { GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame); - SalLongPressEvent aEvent; + if(pThis) + { + SalLongPressEvent aEvent; - gdouble x, y; - GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)); - gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y); - aEvent.mnX = x; - aEvent.mnY = y; + gdouble x, y; + GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)); + gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y); + aEvent.mnX = x; + aEvent.mnY = y; - pThis->CallCallback(SALEVENT_LONGPRESS, &aEvent); + pThis->CallCallback(SALEVENT_LONGPRESS, &aEvent); + } } #endif |