avoid array overrun

This commit is contained in:
David Tardon 2011-05-16 10:06:27 +02:00
parent e548d6364f
commit bd91c127a3

View file

@ -718,7 +718,7 @@ sal_Bool SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox *pSourceBox,
pChildIter = NextSibling(pChildIter);
// If possible, fill in Items onDemand
++i;
if(p[i+1] != INDEX_IGNORE &&
if(i < 2 && p[i+1] != INDEX_IGNORE &&
pChildIter->HasChildsOnDemand() &&
!GetModel()->HasChilds(pChildIter))
RequestingChilds(pChildIter);