Kaydet (Commit) 7dc6fbe8 authored tarafından Szymon Kłos's avatar Szymon Kłos Kaydeden (comit) Andras Timar

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 db33c785)

Change-Id: I432046994b3e1662bd7e499681bd20e9696b2d52
Reviewed-on: https://gerrit.libreoffice.org/18571Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9a783cf7
...@@ -3541,15 +3541,18 @@ void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gpointer frame) ...@@ -3541,15 +3541,18 @@ void GtkSalFrame::gestureLongPress(GtkGestureLongPress* gesture, gpointer frame)
{ {
GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame); GtkSalFrame* pThis = static_cast<GtkSalFrame*>(frame);
SalLongPressEvent aEvent; if(pThis)
{
SalLongPressEvent aEvent;
gdouble x, y; gdouble x, y;
GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)); GdkEventSequence *sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y); gtk_gesture_get_point(GTK_GESTURE(gesture), sequence, &x, &y);
aEvent.mnX = x; aEvent.mnX = x;
aEvent.mnY = y; aEvent.mnY = y;
pThis->CallCallback(SALEVENT_LONGPRESS, &aEvent); pThis->CallCallback(SALEVENT_LONGPRESS, &aEvent);
}
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment