Commit 2f5c0b93 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

comctl32: Respect an assert in TREEVIEW_RemoveAllChildren.

parent 9ae90b35
......@@ -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;
......
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