comctl32: Respect an assert in TREEVIEW_RemoveAllChildren.

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Bruno Jesus 2015-11-23 21:47:56 +08:00 committed by Alexandre Julliard
parent 9ae90b354c
commit 2f5c0b9321
1 changed files with 3 additions and 1 deletions

View File

@ -1441,11 +1441,13 @@ TREEVIEW_RemoveAllChildren(TREEVIEW_INFO *infoPtr, const TREEVIEW_ITEM *parentIt
static void
TREEVIEW_UnlinkItem(const TREEVIEW_ITEM *item)
{
TREEVIEW_ITEM *parentItem = item->parent;
TREEVIEW_ITEM *parentItem;
assert(item != NULL);
assert(item->parent != NULL); /* i.e. it must not be the root */
parentItem = item->parent;
if (parentItem->firstChild == item)
parentItem->firstChild = item->nextSibling;