mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-29 15:32:54 +00:00
- fixed crash on closing fatal error window
Framebuffer was accessed after its destruction
This commit is contained in:
parent
d87f7593b8
commit
f678b5d4d6
2 changed files with 8 additions and 4 deletions
|
@ -2880,7 +2880,7 @@ void D_Cleanup()
|
|||
M_SaveDefaults(NULL); // save config before the restart
|
||||
|
||||
// delete all data that cannot be left until reinitialization
|
||||
screen->CleanForRestart();
|
||||
if (screen) screen->CleanForRestart();
|
||||
V_ClearFonts(); // must clear global font pointers
|
||||
ColorSets.Clear();
|
||||
PainFlashes.Clear();
|
||||
|
|
|
@ -663,10 +663,14 @@ public:
|
|||
savedyfac = CleanYfac;
|
||||
savedwidth = CleanWidth;
|
||||
savedheight = CleanHeight;
|
||||
|
||||
if (screen)
|
||||
{
|
||||
V_CalcCleanFacs(320, 200, screen->GetWidth(), screen->GetHeight(), &CleanXfac, &CleanYfac);
|
||||
CleanWidth = screen->GetWidth() / CleanXfac;
|
||||
CleanHeight = screen->GetHeight() / CleanYfac;
|
||||
}
|
||||
}
|
||||
|
||||
~ScaleOverrider()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue