Kaydet (Commit) 06287413 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705042 Dereference after null check

Change-Id: Iac532477802588333560497767a613bb0a55effe
üst 15c2991a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment