diff --git a/sc2/src/libs/graphics/gfxload.c b/sc2/src/libs/graphics/gfxload.c index a18b09697..969a9102d 100644 --- a/sc2/src/libs/graphics/gfxload.c +++ b/sc2/src/libs/graphics/gfxload.c @@ -321,15 +321,7 @@ _ReleaseCelData (void *handle) return (FALSE); cel_ct = DrawablePtr->MaxIndex + 1; - - if (DrawablePtr->Frame) - { - FramePtr = DrawablePtr->Frame; - if (FramePtr->Type == SCREEN_DRAWABLE) - { - FramePtr = NULL; - } - } + FramePtr = DrawablePtr->Frame; HFree (handle); if (FramePtr) diff --git a/sc2/src/uqm/cleanup.c b/sc2/src/uqm/cleanup.c index 75be8e523..a6e437728 100644 --- a/sc2/src/uqm/cleanup.c +++ b/sc2/src/uqm/cleanup.c @@ -39,7 +39,9 @@ FreeKernel (void) UninitResourceSystem (); DestroyDrawable (ReleaseDrawable (Screen)); + Screen = 0; DestroyContext (ScreenContext); + ScreenContext = 0; UninitVideoPlayer (); UninitSound ();