src/renwindow: correctly free texture and renderer

This commit is contained in:
takase1121
2024-11-25 21:04:45 +08:00
parent 4e3558322c
commit 4d803204a8
+2 -2
View File
@@ -132,11 +132,11 @@ void renwin_update_rects(RenWindow *ren, RenRect *rects, int count) {
}
void renwin_free(RenWindow *ren) {
SDL_DestroyWindow(ren->window);
ren->window = NULL;
#ifdef LITE_USE_SDL_RENDERER
SDL_DestroyTexture(ren->texture);
SDL_DestroyRenderer(ren->renderer);
SDL_FreeSurface(ren->rensurface.surface);
#endif
SDL_DestroyWindow(ren->window);
ren->window = NULL;
}