mirror of https://github.com/libsdl-org/SDL.git
Memory Leak in WIN_CreateHCursor When CreateColorBitmap Fails
This commit is contained in:
parent
69d28027ad
commit
ca9a044b3e
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue