diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2015-07-23 10:54:44 +0200 |
---|---|---|
committer | Szymon Kłos <eszkadev@gmail.com> | 2015-07-24 12:29:07 +0200 |
commit | db33c7853e12e9593a530ce2327e9662bcab1480 (patch) | |
tree | 64a40894bdf4ea622e50ab2c7d44396a61f86ca2 | |
parent | 8f7978245471763e5a2394cc8e67fed33483fe68 (diff) |
fixed crash
While opening folders in SvtFileView using doubleclick,
sometimes GtkSalFrame::gestureLongPress method is
executed with a null frame pointer and LO crashes.
I noticed this only with remote dirs, probably this
bug occurs only when the doubleclick handler routine
takes a lot of time.
Change-Id: I432046994b3e1662bd7e499681bd20e9696b2d52
-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 |