Kaydet (Commit) b72fca4e authored tarafından Miklos Vajna's avatar Miklos Vajna

SvTreeList::GetEntry: detect an out-of-bound and return NULL in that case

That's how this worked prior to stlification.

Change-Id: I4b1a9735c92efc181a2d1f47cafb04d2855fdfe2
üst 37cc83e5
......@@ -1862,7 +1862,7 @@ SvTreeListEntry* SvTreeList::GetEntry( SvTreeListEntry* pParent, sal_uLong nPos
SvTreeListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const
{
SvTreeListEntry* pRet = 0;
if ( nEntryCount )
if ( nEntryCount && nRootPos < pRootItem->maChildren.size())
pRet = &pRootItem->maChildren[nRootPos];
return pRet;
}
......
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