[Libreoffice-commits] core.git: vcl/source
Michael Meeks
michael.meeks at collabora.com
Fri May 15 11:20:14 PDT 2015
vcl/source/window/toolbox.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit ecf9f9f8697dc53798d6d4a6c6db84ac2ed51422
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Fri May 15 19:14:29 2015 +0100
tdf#91311 - handle toolbox tracking events post dispose safely.
Change-Id: I6284de937cd9daca45f37a780c75beb1585bb2a0
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index f19b1a1..4fc1750 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3353,6 +3353,9 @@ bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat )
{
Point aMousePos = rMEvt.GetPosPixel();
+ if ( !mpData )
+ return false;
+
// ToolBox active?
if ( mbDrag && mnCurPos != TOOLBOX_ITEM_NOTFOUND )
{
@@ -3414,6 +3417,9 @@ bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel )
{
ImplDisableFlatButtons();
+ if ( !mpData )
+ return false;
+
// stop eventual running dropdown timer
if( mnCurPos < mpData->m_aItems.size() &&
(mpData->m_aItems[mnCurPos].mnBits & ToolBoxItemBits::DROPDOWN ) )
@@ -5563,7 +5569,7 @@ void ToolBox::ImplHideFocus()
if( mnHighItemId )
{
ImplToolItem* pItem = ImplGetItem( mnHighItemId );
- if( pItem->mpWindow )
+ if( pItem && pItem->mpWindow )
{
vcl::Window *pWin = pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow ? pItem->mpWindow->ImplGetWindowImpl()->mpBorderWindow : pItem->mpWindow;
pWin->ImplGetWindowImpl()->mbDrawSelectionBackground = false;
@@ -5571,7 +5577,7 @@ void ToolBox::ImplHideFocus()
}
}
- if ( mpData->mbMenubuttonSelected )
+ if ( mpData && mpData->mbMenubuttonSelected )
{
// remove highlight from menubutton
InvalidateMenuButton(false);
More information about the Libreoffice-commits
mailing list