- Changed: When the screen is being deleted the 'screen' variable should be

set to NULL before performing the delete. Otherwise, in some abnormal
  situations, it could happen that the destroyed screen object is still
  being accessed.
- Fixed: V_Shutdown didn't set OF_YesReallyDelete before deleting screen.


SVN r870 (trunk)
This commit is contained in:
Christoph Oelckers 2008-03-30 08:58:36 +00:00
commit 5e6f709dbf
4 changed files with 21 additions and 9 deletions

View file

@ -1642,9 +1642,12 @@ void V_Init2()
float gamma = static_cast<DDummyFrameBuffer *>(screen)->Gamma;
FFont *font = screen->Font;
screen->ObjectFlags |= OF_YesReallyDelete;
delete screen;
screen = NULL;
{
DFrameBuffer *s = screen;
screen = NULL;
s->ObjectFlags |= OF_YesReallyDelete;
delete s;
}
I_InitGraphics();
I_ClosestResolution (&width, &height, 8);
@ -1665,10 +1668,12 @@ void V_Init2()
void V_Shutdown()
{
if (screen != NULL)
if (screen)
{
delete screen;
DFrameBuffer *s = screen;
screen = NULL;
s->ObjectFlags |= OF_YesReallyDelete;
delete s;
}
while (FFont::FirstFont != NULL)
{