summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-16 09:34:30 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-16 09:34:30 +0100
commitbaca9020b83c09dc486e706a1e99060cf0dac063 (patch)
treeeb928276d3063f2d2667e8d478569467b4489a45 /svtools
parent3e710c27f7cda7d24206aa01ad7d28df4b08f69d (diff)
More protection for SvTreeListBox.
Change-Id: I55731cd69aa12f5709e300759f556e29e8ceff5d
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/treelistbox.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index bc5e933e9b19..1091438dd0ce 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -2219,10 +2219,10 @@ void SvTreeListBox::GetFocus()
void SvTreeListBox::LoseFocus()
{
- //If there is no item in the tree, delete visual focus.
- if( !First())
+ // If there is no item in the tree, delete visual focus.
+ if ( !First() )
Invalidate();
- if( pImp )
+ if ( pImp )
pImp->LoseFocus();
Control::LoseFocus();
}
@@ -3514,6 +3514,8 @@ void SvTreeListBox::NotifyScrolled()
void SvTreeListBox::Invalidate( sal_uInt16 nInvalidateFlags )
{
+ if (!pImp)
+ return;
if( nFocusWidth == -1 )
// to make sure that the control doesn't show the wrong focus rectangle
// after painting