src/renwindow: correctly free texture and renderer
This commit is contained in:
parent
96579d9a7f
commit
3d0344393c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue