summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-15 19:14:29 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-15 19:26:56 +0100
commitecf9f9f8697dc53798d6d4a6c6db84ac2ed51422 (patch)
tree54cd358e10ba94d138b942d6c03b530908c66cdc /vcl
parent1e49e40c3694cd5750b65fc726b9684ae4185d4f (diff)
tdf#91311 - handle toolbox tracking events post dispose safely.
Change-Id: I6284de937cd9daca45f37a780c75beb1585bb2a0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/toolbox.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index f19b1a13427d..4fc1750bed63 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);