ddraw: Do not use unset viewport in viewport_activate().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2018-11-12 15:13:06 +01:00 committed by Alexandre Julliard
parent f4865564ec
commit ecad1995a0
1 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,12 @@ void viewport_activate(struct d3d_viewport *This, BOOL ignore_lights)
}
}
if (This->version == DDRAW_VIEWPORT_VERSION_NONE)
{
TRACE("Viewport data was not set.\n");
return;
}
/* And copy the values in the structure used by the device */
if (This->version == DDRAW_VIEWPORT_VERSION_2)
{