1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-07 11:03:55 +00:00

added missing free for MouseCursor capture

This commit is contained in:
Bryan Roe
2019-09-19 17:03:06 -07:00
parent c6042e0935
commit 8dbd0c956c

View File

@@ -83,13 +83,13 @@ int KVM_GetCursorHash(HCURSOR hc, char *buffer, size_t bufferLen)
DrawIconEx(hdcMem, 0, 0, hc, bm.bmWidth, ii.hbmColor ? bm.bmHeight : (bm.bmHeight / 2), 0, NULL, DI_NORMAL);
GetDIBits(hdcScreen, hbmCanvas, 0, 0, NULL, &bmpInfo, DIB_RGB_COLORS);
tmpBuffer = (char*)malloc(bmpInfo.bmiHeader.biSizeImage);
if ((tmpBuffer = (char*)malloc(bmpInfo.bmiHeader.biSizeImage)) == NULL) { ILIBCRITICALEXIT(254); }
bmpInfo.bmiHeader.biCompression = BI_RGB;
GetDIBits(hdcScreen, hbmCanvas, 0, (UINT)(ii.hbmColor ? bm.bmHeight : (bm.bmHeight / 2)), tmpBuffer, &bmpInfo, DIB_RGB_COLORS);
crc = util_crc((unsigned char*)tmpBuffer, bmpInfo.bmiHeader.biSizeImage, 0);
free(tmpBuffer);
SelectObject(hdcMem, hbmold);
ReleaseDC(NULL, hdcMem);
ReleaseDC(NULL, hdcScreen);