diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-09-13 17:26:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-09-13 17:50:31 +0100 |
commit | 06287413acd3ea58051835a6de0383b668164f27 (patch) | |
tree | 74c10fcc7dc5a891192ddc371bad9d9fb207b805 | |
parent | 15c2991a6e72bf3b83d846a1155ab8666f4cc424 (diff) |
coverity#705042 Dereference after null check
Change-Id: Iac532477802588333560497767a613bb0a55effe
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 83f23c3fbf9e..994cd538afdb 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -431,10 +431,10 @@ sal_uInt16 SwGlobalTree::GetEnableFlags() const if(nSelCount == 1) { nRet |= ENABLE_EDIT; - if( ((SwGlblDocContent*)pEntry->GetUserData())->GetType() != GLBLDOC_UNKNOWN && + if (pEntry && ((SwGlblDocContent*)pEntry->GetUserData())->GetType() != GLBLDOC_UNKNOWN && (!pPrevEntry || ((SwGlblDocContent*)pPrevEntry->GetUserData())->GetType() != GLBLDOC_UNKNOWN)) nRet |= ENABLE_INSERT_TEXT; - if( GLBLDOC_SECTION == ((SwGlblDocContent*)pEntry->GetUserData())->GetType() ) + if (pEntry && GLBLDOC_SECTION == ((SwGlblDocContent*)pEntry->GetUserData())->GetType()) nRet |= ENABLE_EDIT_LINK; } else if(!nEntryCount) |