Fix a bug reported in Issue #94.

This commit is contained in:
Vincent Wei
2022-10-19 17:53:39 +08:00
parent 57cc74410f
commit a9da4ddfba

View File

@@ -1743,11 +1743,6 @@ static int dskOnRemoveCtrlInstance (PCONTROL pParent, PCONTROL pCtrl)
FreeZOrderNode (0, pCtrl->idx_znode, NULL);
}
if (fFound) {
pCtrl->pcci->nUseCount --;
return 0;
}
if ((HWND)pCtrl == __mg_captured_wnd) {
/* force release the capture */
__mg_captured_wnd = 0;
@@ -1762,6 +1757,11 @@ static int dskOnRemoveCtrlInstance (PCONTROL pParent, PCONTROL pCtrl)
sg_msgAutoRepeat.hwnd = 0;
}
if (fFound) {
pCtrl->pcci->nUseCount--;
return 0;
}
return -1;
}