coverity#705860 Dereference before null check

Change-Id: I05f23c5d1581f6673660d59f7fe7e5f89d7d0919
This commit is contained in:
Caolán McNamara
2014-05-23 12:21:30 +01:00
parent afe26bb894
commit 71d21de098

View File

@@ -1522,7 +1522,7 @@ SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation)
// Advance to next sibling.
SvTreeListEntry* pNext;
sal_uInt16 nDepth (0);
while (pEntry != NULL)
do
{
pNext = dynamic_cast<SvTreeListEntry*>(NextVisible(pEntry, &nDepth));
if (pNext != NULL && nDepth > 0 && nDepth!=0xffff)
@@ -1530,6 +1530,7 @@ SvTreeListEntry* SdPageObjsTLB::GetDropTarget (const Point& rLocation)
else
break;
}
while (pEntry != NULL);
}
return pEntry;