af3c319
From dae7d2089516d9cf014b9fad0adb484f19282a29 Mon Sep 17 00:00:00 2001
af3c319
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
af3c319
Date: Sat, 24 Jan 2015 20:59:27 +0000
af3c319
Subject: [PATCH] Resolves: rhbz#1179642 crash in GetFocus with empty
af3c319
 mpPreviouslyFocusedListBox
af3c319
af3c319
Change-Id: I7559067c00617482d34e7cbdd177202868cbfc76
af3c319
---
af3c319
 sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx | 5 +++--
af3c319
 1 file changed, 3 insertions(+), 2 deletions(-)
af3c319
af3c319
diff --git a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
af3c319
index 84b61d4..ff0c95e 100644
af3c319
--- a/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
af3c319
+++ b/sc/source/ui/dbgui/PivotLayoutTreeListBase.cxx
af3c319
@@ -123,9 +123,10 @@ void ScPivotLayoutTreeListBase::GetFocus()
af3c319
     if( GetGetFocusFlags() & GETFOCUS_MNEMONIC )
af3c319
     {
af3c319
         SvTreeListEntry* pEntry = mpParent->mpPreviouslyFocusedListBox->GetCurEntry();
af3c319
-        InsertEntryForSourceTarget(pEntry, NULL);
af3c319
+        if (pEntry)
af3c319
+            InsertEntryForSourceTarget(pEntry, NULL);
af3c319
 
af3c319
-        if(mpParent->mpPreviouslyFocusedListBox != NULL)
af3c319
+        if (mpParent->mpPreviouslyFocusedListBox != NULL)
af3c319
             mpParent->mpPreviouslyFocusedListBox->GrabFocus();
af3c319
     }
af3c319
 
af3c319
-- 
af3c319
1.9.3
af3c319