From: Bruno Jesus <00cpxxx@gmail.com> Date: Mon, 23 Nov 2015 13:47:56 +0000 (+0800) Subject: comctl32: Respect an assert in TREEVIEW_RemoveAllChildren. X-Git-Url: http://git.etersoft.ru/projects/?a=commitdiff_plain;h=2f5c0b93219058b5e1610475b04be8dddc6acd89;p=wine%2Feterwine.git comctl32: Respect an assert in TREEVIEW_RemoveAllChildren. Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 6adafc46b2..dc196555ff 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -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;