Removing Double-free Issue

This commit is contained in:
ImThour
2025-02-18 04:53:36 +05:30
committed by Sam Lantinga
parent 5c79f4cae1
commit 057c3602e9

View File

@@ -418,10 +418,6 @@ static HCURSOR GetCachedCursor(SDL_Cursor *cursor)
entry = (CachedCursor *)SDL_malloc(sizeof(*entry));
if (!entry) {
if (hcursor) {
DestroyCursor(hcursor);
}
SDL_free(entry);
goto error;
}
entry->cursor = hcursor;