From 0adb67017b76086da909382a632b288e17cf5848 Mon Sep 17 00:00:00 2001 From: pionere Date: Tue, 12 Apr 2022 09:01:17 +0200 Subject: [PATCH] avoid NullPointer in SDL_GetRenderTarget --- src/render/SDL_render.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 9bb953edd..1068150eb 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -2263,6 +2263,8 @@ SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture) SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer) { + CHECK_RENDERER_MAGIC(renderer, NULL); + return renderer->target; }