Added check for failure of D3D_ActivateRenderer()
authorSam Lantinga <slouken@libsdl.org>
Fri, 08 Dec 2017 11:34:32 -0800
changeset 11739d6c857a74735
parent 11738 5fd4a464dee5
child 11740 24c1d2de7a09
Added check for failure of D3D_ActivateRenderer()
src/render/direct3d/SDL_render_d3d.c
     1.1 --- a/src/render/direct3d/SDL_render_d3d.c	Fri Dec 08 11:33:27 2017 -0800
     1.2 +++ b/src/render/direct3d/SDL_render_d3d.c	Fri Dec 08 11:34:32 2017 -0800
     1.3 @@ -1077,7 +1077,9 @@
     1.4  static int
     1.5  D3D_SetRenderTarget(SDL_Renderer * renderer, SDL_Texture * texture)
     1.6  {
     1.7 -    D3D_ActivateRenderer(renderer);
     1.8 +    if (D3D_ActivateRenderer(renderer) < 0) {
     1.9 +        return -1;
    1.10 +    }
    1.11  
    1.12      return D3D_SetRenderTargetInternal(renderer, texture);
    1.13  }