null check on freeing

This commit is contained in:
CrackedPixel 2026-04-17 00:05:12 -05:00
parent 3f56af68bb
commit 2fb3e638be

View File

@ -1880,7 +1880,15 @@ void ClosePlatform(void)
mg_gamepads_free(&platform.minigamepad);
RGFW_window_close(platform.window);
RL_FREE(platform.framebufferPixels);
if (platform.framebufferPixels != NULL)
{
RL_FREE(platform.framebufferPixels);
}
if (platform.framebuffer != NULL)
{
RGFW_surface_free(platform.framebuffer);
}
}
// Keycode mapping