fix a bug in FreeZOrderNodeEx

This commit is contained in:
Vincent Wei
2020-02-13 20:51:29 +08:00
parent 725b7eecb1
commit 0a2b9749bd
+4 -2
View File
@@ -2510,13 +2510,15 @@ static int FreeZOrderNodeEx (ZORDERINFO* zi, int idx_znode, HDC* memdc)
nodes [idx_znode].cli = -1;
nodes [idx_znode].flags &= ~ZOF_VISIBLE;
}
else if (*first == idx_znode) {
else {
/* unchain it */
unchain_znode ((unsigned char*)(zi+1), nodes, idx_znode);
nodes [idx_znode].hwnd = HWND_NULL;
nodes [idx_znode].cli = -1;
*first = nodes [idx_znode].next;
if (*first == idx_znode) {
*first = nodes [idx_znode].next;
}
*nr_nodes -= 1;
}