Fixed memory leaks if Windows initialization fails

This commit is contained in:
Sam Lantinga committed 2024-10-21 15:22:56 -07:00
1 parent d199586683
commit 82b3325978
1 file changed
+1
+1
View File
@@ -135,6 +135,7 @@ static SDL_VideoDevice *WIN_CreateDevice(void)
data = NULL;
}
if (!data) {
SDL_UnregisterApp();
SDL_free(device);
return NULL;
}