mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-28 00:54:35 +00:00
Memory Leak in WIN_CreateHCursor When CreateColorBitmap Fails
This commit is contained in:
@@ -210,6 +210,12 @@ static HCURSOR WIN_CreateHCursor(SDL_Surface *surface, int hot_x, int hot_y)
|
||||
|
||||
if (!ii.hbmMask || (!is_monochrome && !ii.hbmColor)) {
|
||||
SDL_SetError("Couldn't create cursor bitmaps");
|
||||
if (ii.hbmMask) {
|
||||
DeleteObject(ii.hbmMask);
|
||||
}
|
||||
if (ii.hbmColor) {
|
||||
DeleteObject(ii.hbmColor);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user