Skip to content
Permalink
Browse files

- fixed crash on closing fatal error window

Framebuffer was accessed after its destruction
  • Loading branch information...
alexey-lysiuk authored and coelckers committed Oct 8, 2019
1 parent d87f759 commit f678b5d4d6cf566f04f0496bbb0d30efe7d5b479
Showing with 8 additions and 4 deletions.
  1. +1 −1 src/d_main.cpp
  2. +7 −3 src/rendering/v_video.h
@@ -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,9 +663,13 @@ class ScaleOverrider
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()

0 comments on commit f678b5d

Please sign in to comment.
You can’t perform that action at this time.