- 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
parent 868782a843
commit 5e6f709dbf
4 changed files with 21 additions and 9 deletions

View file

@ -1,4 +1,9 @@
March 30, 2008 (Changes by Graf Zahl)
- 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.
- Fixed: The HIRESTEX parser didn't check if a graphic specified in a remap
command actually existed.
- Fixed: My $Limit fix from yesterday didn't work because NearLimit was

View file

@ -53,9 +53,10 @@ void I_ShutdownGraphics ()
{
if (screen)
{
screen->ObjectFlags |= OF_YesReallyDelete;
delete screen;
DFrameBuffer *s = screen;
screen = NULL;
s->ObjectFlags |= OF_YesReallyDelete;
delete s;
}
if (Video)
delete Video, Video = NULL;

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)
{

View file

@ -62,9 +62,10 @@ void I_ShutdownGraphics ()
{
if (screen)
{
screen->ObjectFlags |= OF_YesReallyDelete;
delete screen;
DFrameBuffer *s = screen;
screen = NULL;
s->ObjectFlags |= OF_YesReallyDelete;
delete s;
}
if (Video)
delete Video, Video = NULL;