diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-24 15:20:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-24 15:53:45 +0100 |
commit | 7c654ee9d51a752e02c0a972de27d699ab5b649a (patch) | |
tree | 52cc31625b932ae51e4f65bb9ed34d96118fea58 /sw/source | |
parent | d562df03098ecb91a89e91ccf69dd6a1eeb98c89 (diff) |
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
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/docvw/SidebarScrollBar.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/docvw/SidebarScrollBar.hxx | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/SidebarScrollBar.cxx b/sw/source/uibase/docvw/SidebarScrollBar.cxx index ede46100b37c..9e2c299e81de 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.cxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.cxx @@ -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); diff --git a/sw/source/uibase/docvw/SidebarScrollBar.hxx b/sw/source/uibase/docvw/SidebarScrollBar.hxx index ea5639e42e92..0de225b2a135 100644 --- a/sw/source/uibase/docvw/SidebarScrollBar.hxx +++ b/sw/source/uibase/docvw/SidebarScrollBar.hxx @@ -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(); |