Kaydet (Commit) 5550ce08 authored tarafından Michael Stahl's avatar Michael Stahl

SwGlobalTree: tweak that assert, it triggers always

On the last iteration, null pointer is expected.

Change-Id: I2cabb4ecb1d040b725a2c85b58dbff4204d107dc
üst c79a5f87
......@@ -631,14 +631,12 @@ void SwGlobalTree::Display(bool bOnlyUpdateUserData)
if(bOnlyUpdateUserData && GetEntryCount() == pSwGlblDocContents->size())
{
SvTreeListEntry* pEntry = First();
for( size_t i = 0; i < nCount; i++)
for (size_t i = 0; i < nCount && pEntry; i++)
{
SwGlblDocContent* pCont = (*pSwGlblDocContents)[i];
pEntry->SetUserData(pCont);
pEntry = Next(pEntry);
assert(pEntry);
if (!pEntry)
break;
assert(pEntry || i == nCount - 1);
}
}
else
......
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