comctl32: Respect an assert in TREEVIEW_RemoveAllChildren
Bruno Jesus
00cpxxx at gmail.com
Mon Nov 23 07:47:56 CST 2015
Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
-------------- next part --------------
diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c
index 6adafc4..dc19655 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;
More information about the wine-patches
mailing list