mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 14:51:46 +00:00
- 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:
parent
868782a843
commit
5e6f709dbf
4 changed files with 21 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue