Removing Double-free Issue

This commit is contained in:
ImThour authored and Sam Lantinga committed 2025-02-17 15:34:18 -08:00
1 parent 5c79f4cae1
commit 057c3602e9
1 file changed
-4
-4
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;