Game::ClearDisplay() null check gaclrFixed

gaclrFixed may be null if a game database is not found. Calling
GetColor() in this case may result in a crash.
This commit is contained in:
Nathan Fulton 2017-04-29 22:43:01 -04:00
parent 05f1755637
commit 3ed85e5813

View File

@ -1999,7 +1999,8 @@ void Game::ClearDisplay()
DibBitmap *pbmBack = gpdisp->GetBackDib();
if (pbmBack == NULL)
return;
pbmBack->Clear(GetColor(kiclrBlack));
if (gaclrFixed != NULL)
pbmBack->Clear(GetColor(kiclrBlack));
if (gpmfrmm != NULL) {
gpmfrmm->InvalidateRect(NULL);
gpmfrmm->DrawFrame(false, false);