mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-04-29 23:41:38 -06:00
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:
parent
05f1755637
commit
3ed85e5813
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user