[BUG_FIXED] Fix a crash issue while using function list.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1078 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2013-07-11 18:22:55 +00:00
parent 48a968a8cc
commit 0f512c77cd

View File

@ -549,10 +549,12 @@ bool TreeView::restoreFoldingStateFrom(const TreeStateNode & treeState2Compare,
if (treeState2Compare._isSelected) //= (tvItem.state & TVIS_SELECTED) != 0;
selectItem(treeviewNode);
int i = 0;
size_t i = 0;
bool isOk = true;
for (HTREEITEM hItem = getChildFrom(treeviewNode); hItem != NULL; hItem = getNextSibling(hItem))
{
if (i >= treeState2Compare._children.size())
return false;
isOk = restoreFoldingStateFrom(treeState2Compare._children.at(i), hItem);
if (!isOk)
break;