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,9 +1880,17 @@ void ClosePlatform(void)
mg_gamepads_free(&platform.minigamepad); mg_gamepads_free(&platform.minigamepad);
RGFW_window_close(platform.window); RGFW_window_close(platform.window);
if (platform.framebufferPixels != NULL)
{
RL_FREE(platform.framebufferPixels); RL_FREE(platform.framebufferPixels);
} }
if (platform.framebuffer != NULL)
{
RGFW_surface_free(platform.framebuffer);
}
}
// Keycode mapping // Keycode mapping
static KeyboardKey ConvertScancodeToKey(u32 keycode) static KeyboardKey ConvertScancodeToKey(u32 keycode)
{ {