mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
Proper Resource Cleanup in WIN_UpdateWindowShape
mask is created but never deleted if SetWindowRgn() fails. This may lead to resource leaks.
This commit is contained in:
@@ -116,6 +116,7 @@ bool WIN_UpdateWindowShape(SDL_VideoDevice *_this, SDL_Window *window, SDL_Surfa
|
||||
}
|
||||
}
|
||||
if (!SetWindowRgn(data->hwnd, mask, TRUE)) {
|
||||
DeleteObject(mask);
|
||||
return WIN_SetError("SetWindowRgn failed");
|
||||
}
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user