mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-19 19:28:28 +00:00
Fixed warning C6011: Dereferencing NULL pointer 'viewport'.
This commit is contained in:
parent
230581f4a8
commit
6ee34380f4
1 changed files with 1 additions and 1 deletions
|
@ -643,7 +643,7 @@ static void SetDrawState(SDL_Surface *surface, SW_DrawStateCache *drawstate)
|
|||
const SDL_Rect *cliprect = drawstate->cliprect;
|
||||
SDL_assert_release(viewport != NULL); /* the higher level should have forced a SDL_RENDERCMD_SETVIEWPORT */
|
||||
|
||||
if (cliprect) {
|
||||
if (cliprect && viewport) {
|
||||
SDL_Rect clip_rect;
|
||||
clip_rect.x = cliprect->x + viewport->x;
|
||||
clip_rect.y = cliprect->y + viewport->y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue