c49ae22
From 49935e70b07d1e0ae6853ca1bd6d587dda562a71 Mon Sep 17 00:00:00 2001
c49ae22
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
c49ae22
Date: Wed, 20 Mar 2019 09:16:28 +0000
c49ae22
Subject: [PATCH] rhbz#1690645 null deref of pEntry when GetCurEntry return
c49ae22
 null
c49ae22
c49ae22
in GetFocusRect at SvTreeList::GetDepth
c49ae22
c49ae22
code in since....
c49ae22
c49ae22
commit 76c549eb01dcb7b5bf28a271ce00e386f3d388ba
c49ae22
Author: Steve Yin <steve_y@apache.org>
c49ae22
Date:   Fri Nov 29 13:03:27 2013 +0000
c49ae22
c49ae22
    Integrate branch of IAccessible2
c49ae22
c49ae22
Change-Id: Ida6cb934c94037c861c7d5da005226f32599b5fc
c49ae22
---
c49ae22
 sw/source/uibase/utlui/content.cxx | 11 +++++------
c49ae22
 1 file changed, 5 insertions(+), 6 deletions(-)
c49ae22
c49ae22
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
c49ae22
index 1bb69c686343..01021f7129e1 100644
c49ae22
--- a/sw/source/uibase/utlui/content.cxx
c49ae22
+++ b/sw/source/uibase/utlui/content.cxx
c49ae22
@@ -2850,15 +2850,14 @@ void SwContentTree::KeyInput(const KeyEvent& rEvent)
c49ae22
     //and realize multi-selection .
c49ae22
     else if(aCode.GetCode() == KEY_SPACE && 0 == aCode.GetModifier())
c49ae22
     {
c49ae22
-
c49ae22
         SvTreeListEntry* pEntry = GetCurEntry();
c49ae22
-        if( GetChildCount( pEntry ) == 0 )
c49ae22
-            m_bIsKeySpace = true;
c49ae22
-        Point tempPoint = GetEntryPosition( pEntry );//Change from "GetEntryPos" to "GetEntryPosition" for acc migration
c49ae22
-        m_aOldRectangle = GetFocusRect( pEntry,tempPoint.Y() );
c49ae22
-
c49ae22
         if(pEntry)
c49ae22
         {
c49ae22
+            if( GetChildCount( pEntry ) == 0 )
c49ae22
+                m_bIsKeySpace = true;
c49ae22
+            Point tempPoint = GetEntryPosition( pEntry );//Change from "GetEntryPos" to "GetEntryPosition" for acc migration
c49ae22
+            m_aOldRectangle = GetFocusRect(pEntry, tempPoint.Y());
c49ae22
+
c49ae22
             if (State::HIDDEN != m_eState)
c49ae22
             {
c49ae22
                 if (State::CONSTANT == m_eState)
c49ae22
-- 
c49ae22
2.20.1
c49ae22