avoid NullPointer in SDL_GetRenderTarget

This commit is contained in:
pionere 2022-04-12 09:01:17 +02:00 committed by Ryan C. Gordon
parent 01b14e14e6
commit 0adb67017b
1 changed files with 2 additions and 0 deletions

View File

@ -2263,6 +2263,8 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)
SDL_Texture * SDL_Texture *
SDL_GetRenderTarget(SDL_Renderer *renderer) SDL_GetRenderTarget(SDL_Renderer *renderer)
{ {
CHECK_RENDERER_MAGIC(renderer, NULL);
return renderer->target; return renderer->target;
} }