- fixed crash on closing fatal error window

Framebuffer was accessed after its destruction
This commit is contained in:
alexey.lysiuk 2019-10-08 13:18:59 +03:00 committed by Christoph Oelckers
commit f678b5d4d6
2 changed files with 8 additions and 4 deletions

View file

@ -663,9 +663,13 @@ public:
savedyfac = CleanYfac;
savedwidth = CleanWidth;
savedheight = CleanHeight;
V_CalcCleanFacs(320, 200, screen->GetWidth(), screen->GetHeight(), &CleanXfac, &CleanYfac);
CleanWidth = screen->GetWidth() / CleanXfac;
CleanHeight = screen->GetHeight() / CleanYfac;
if (screen)
{
V_CalcCleanFacs(320, 200, screen->GetWidth(), screen->GetHeight(), &CleanXfac, &CleanYfac);
CleanWidth = screen->GetWidth() / CleanXfac;
CleanHeight = screen->GetHeight() / CleanYfac;
}
}
~ScaleOverrider()