Module: wine Branch: master Commit: ecad1995a0c13ec39673412adcc6f05e47ea51bc URL: https://source.winehq.org/git/wine.git/?a=commit;h=ecad1995a0c13ec39673412ad... Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Nov 12 15:13:06 2018 +0100 ddraw: Do not use unset viewport in viewport_activate(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/viewport.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 8cc60f1..e6f8621 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -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) {