diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-01-24 20:59:27 +0000 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2015-01-27 17:51:00 +0000 |
commit | 2d2a5bf76d9bfa3bc2951d50e79fe79651569cbd (patch) | |
tree | 2a738add62dcf4527fa1dfd0acf4e5c87dc671b6 | |
parent | f3be004eca2c8fb7776fb83b630cb33b2ee3ed25 (diff) |
Resolves: rhbz#1179642 crash in GetFocus with empty mpPreviouslyFocusedListBox
Change-Id: I7559067c00617482d34e7cbdd177202868cbfc76
(cherry picked from commit dae7d2089516d9cf014b9fad0adb484f19282a29)
Reviewed-on: https://gerrit.libreoffice.org/14163
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx index 3710e4ca0f03..34fd1f72fb0b 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(); } |