use GAL_RefSurface() in CreateMemDCFromSurface()

This commit is contained in:
Vincent Wei
2023-09-01 10:01:11 +08:00
parent b4ce6f9f10
commit fbebc94718
7 changed files with 28 additions and 20 deletions
+2 -2
View File
@@ -848,7 +848,7 @@ static int srvAllocZOrderNode (int cli, HWND hwnd, HWND main_win,
}
if (surf) {
memdc = CreateMemDCFromSurface (surf);
memdc = __mg_create_memdc_for_surface (surf);
if (memdc == HDC_INVALID) {
if (cli > 0) {
GAL_FreeSurface (surf);
@@ -1003,7 +1003,7 @@ static int srvMoveWindow (int cli, int idx_znode, const RECT* rcWin,
}
if (surf) {
memdc = CreateMemDCFromSurface (surf);
memdc = __mg_create_memdc_for_surface (surf);
if (memdc == HDC_INVALID) {
if (cli > 0) {
GAL_FreeSurface (surf);
+1 -1
View File
@@ -1614,7 +1614,7 @@ static int srvStartTrackPopupMenu (int cli, const RECT* rc, HWND ptmi,
}
if (surf) {
memdc = CreateMemDCFromSurface (surf);
memdc = __mg_create_memdc_for_surface (surf);
if (memdc == HDC_INVALID) {
GAL_FreeSurface (surf);
_WRN_PRINTF("failed to create memory dc for znode\n");