From: Bart House Date: Fri, 16 Nov 2018 21:50:12 +0000 (-0800) Subject: Delete GDI objects when map window is destroyed. X-Git-Tag: NetHack-3.6.2_Released~167^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcac95b4b3f5b4416fe8e471d08dca92797307f5;p=nethack Delete GDI objects when map window is destroyed. --- diff --git a/win/win32/mhmap.c b/win/win32/mhmap.c index 4afdf6e3a..a1690ef8e 100644 --- a/win/win32/mhmap.c +++ b/win/win32/mhmap.c @@ -566,6 +566,10 @@ MapWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_DESTROY: if (data->hMapFont) DeleteObject(data->hMapFont); + if (data->hBackBuffer) + DeleteBitmap(data->hBackBuffer); + if (data->backBufferDC) + DeleteDC(data->backBufferDC); free(data); SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) 0); break;