Skip to content

Commit

Permalink
Added check for failure of D3D_ActivateRenderer()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 8, 2017
1 parent 127841f commit cac4e31
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/direct3d/SDL_render_d3d.c
Expand Up @@ -1077,7 +1077,9 @@ D3D_SetRenderTargetInternal(SDL_Renderer * renderer, SDL_Texture * texture)
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);
}
Expand Down

0 comments on commit cac4e31

Please sign in to comment.