summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-01-24 20:59:27 +0000
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2015-02-03 11:21:17 +0000
commit36079acc525142932e6dc5f73d9b3858c2092b8f (patch)
tree9e4034050a18d1f65696c1fffbce3d782280bd52
parenta0ef7698b7df63b8befe274305051063425f8eb6 (diff)
Resolves: rhbz#1179642 crash in GetFocus with empty mpPreviouslyFocusedListBox
Change-Id: I7559067c00617482d34e7cbdd177202868cbfc76 (cherry picked from commit dae7d2089516d9cf014b9fad0adb484f19282a29) Reviewed-on: https://gerrit.libreoffice.org/14161 Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r--sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
index 84b61d466996..ff0c95ea771c 100644
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
@@ -123,9 +123,10 @@ void ScPivotLayoutTreeListBase::GetFocus()
if( GetGetFocusFlags() & GETFOCUS_MNEMONIC )
{
SvTreeListEntry* pEntry = mpParent->mpPreviouslyFocusedListBox->GetCurEntry();
- InsertEntryForSourceTarget(pEntry, NULL);
+ if (pEntry)
+ InsertEntryForSourceTarget(pEntry, NULL);
- if(mpParent->mpPreviouslyFocusedListBox != NULL)
+ if (mpParent->mpPreviouslyFocusedListBox != NULL)
mpParent->mpPreviouslyFocusedListBox->GrabFocus();
}