Kaydet (Commit) 0088ea98 authored tarafından Miklos Vajna's avatar Miklos Vajna

sw lok comments: avoid crash an exit after clicking the scrollbar

Without this, vcl::Window::ImplTrackTimerHdl() will be called on a
deleted vcl::Window.

Can be reproduced with a comment having a scrollbar in a LOK client,
then clicking on the down button of the scrollbar a number of times ->
crash on exit.

Change-Id: I5d67f96e8baa199f65ec5cf39cb5d39c8162ff33
(cherry picked from commit 7c654ee9)
üst 96578c97
......@@ -60,6 +60,11 @@ void SidebarScrollBar::LogicInvalidate(const Rectangle* pRectangle)
rWrtShell.libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
}
void SidebarScrollBar::MouseButtonUp(const MouseEvent& /*rMouseEvent*/)
{
EndTracking();
}
void SidebarScrollBar::MouseMove(const MouseEvent& rMouseEvent)
{
TrackingEvent aEvent(rMouseEvent);
......
......@@ -31,6 +31,7 @@ protected:
/// @see OutputDevice::LogicInvalidate().
void LogicInvalidate(const Rectangle* pRectangle) override;
void MouseMove(const MouseEvent& rMouseEvent) override;
void MouseButtonUp(const MouseEvent& rMouseEvent) override;
public:
SidebarScrollBar(SwSidebarWin& rSidebarWin, WinBits nStyle, SwView& rView);
virtual ~SidebarScrollBar();
......
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