[Commits] SDL: Added check for failure of D3D_ActivateRenderer()

libsdl.org revision control commits-owner at libsdl.org
Fri Dec 8 11:34:35 PST 2017


details:   https://hg.libsdl.org/SDL/rev/d6c857a74735
changeset: 11739:d6c857a74735
user:      Sam Lantinga <slouken at libsdl.org>
date:      Fri Dec 08 11:34:32 2017 -0800
description:
Added check for failure of D3D_ActivateRenderer()

diffstat:

 src/render/direct3d/SDL_render_d3d.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r 5fd4a464dee5 -r d6c857a74735 src/render/direct3d/SDL_render_d3d.c
--- a/src/render/direct3d/SDL_render_d3d.c	Fri Dec 08 11:33:27 2017 -0800
+++ b/src/render/direct3d/SDL_render_d3d.c	Fri Dec 08 11:34:32 2017 -0800
@@ -1077,7 +1077,9 @@
 static int
 D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
 {
-    D3D_ActivateRenderer(renderer);
+    if (D3D_ActivateRenderer(renderer) < 0) {
+        return -1;
+    }
 
     return D3D_SetRenderTargetInternal(renderer, texture);
 }


More information about the commits mailing list