From ec859009b712d984bc5cb90f341a8cd0a3e53cea Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Tue, 7 Aug 2012 01:34:20 +0200 Subject: [PATCH] Add a sanity check for viewports with zero width/height. Fixes issue 5466. --- Source/Core/VideoCommon/Src/RenderBase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/RenderBase.cpp b/Source/Core/VideoCommon/Src/RenderBase.cpp index 6f1f9c411a..0bd1c89118 100644 --- a/Source/Core/VideoCommon/Src/RenderBase.cpp +++ b/Source/Core/VideoCommon/Src/RenderBase.cpp @@ -386,5 +386,6 @@ void Renderer::RecordVideoMemory() void UpdateViewport(Matrix44& vpCorrection) { - g_renderer->UpdateViewport(vpCorrection); + if (xfregs.viewport.wd != 0 && xfregs.viewport.ht != 0) + g_renderer->UpdateViewport(vpCorrection); }