From 06287413acd3ea58051835a6de0383b668164f27 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 13 Sep 2014 17:26:28 +0100 Subject: coverity#705042 Dereference after null check Change-Id: Iac532477802588333560497767a613bb0a55effe --- sw/source/uibase/utlui/glbltree.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') 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) -- cgit