vcl/unx/gtk/window/gtksalframe.cxx |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

New commits:
commit fae0437caa6a1c51a0c4ab9595069fb8db890ea3
Author: Szymon Kłos <eszka...@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/18572
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Tested-by: Miklos Vajna <vmik...@collabora.co.uk>

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
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to