[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - vcl/unx
Szymon Kłos
eszkadev at gmail.com
Mon Sep 14 08:57:11 PDT 2015
vcl/unx/gtk/window/gtksalframe.cxx | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 5eb91d291d383c519c5b931bc6218c0c5caa8f3d
Author: Szymon Kłos <eszkadev at gmail.com>
Date: Thu Jul 23 10:54:44 2015 +0200
Resolves: tdf#93778 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.
(cherry picked from commit db33c7853e12e9593a530ce2327e9662bcab1480)
Change-Id: I432046994b3e1662bd7e499681bd20e9696b2d52
Reviewed-on: https://gerrit.libreoffice.org/18571
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 7f8570e..347497c 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -3541,15 +3541,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
More information about the Libreoffice-commits
mailing list