Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed error message when destroying a software renderer, thanks to wa…
Browse files Browse the repository at this point in the history
…hono for the patch.
  • Loading branch information
slouken committed Sep 7, 2012
1 parent d5e7dda commit f478fdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/SDL_render.c
Expand Up @@ -1373,7 +1373,9 @@ SDL_DestroyRenderer(SDL_Renderer * renderer)
SDL_DestroyTexture(renderer->textures);
}

SDL_SetWindowData(renderer->window, SDL_WINDOWRENDERDATA, NULL);
if (renderer->window) {
SDL_SetWindowData(renderer->window, SDL_WINDOWRENDERDATA, NULL);
}

/* It's no longer magical... */
renderer->magic = NULL;
Expand Down

0 comments on commit f478fdc

Please sign in to comment.