always call ReleaseDC even if it is a private CDC in release_valid_dc

This commit is contained in:
Vincent Wei
2020-02-27 10:36:11 +08:00
parent 2ae820992f
commit 366bbb1ff0

View File

@@ -697,8 +697,9 @@ static inline void release_valid_dc (PMAINWIN pWin, HDC hdc)
ReleaseSecondarySubDC (hdc);
}
else {
if (pWin->privCDC != hdc)
ReleaseDC (hdc);
// Since 5.0.0, we always call ReleaseDC even if it is private CDC.
// if (pWin->privCDC != hdc)
ReleaseDC (hdc);
}
}