From 78278af46a4fad3de35caa42d72fb2b8ef38612e Mon Sep 17 00:00:00 2001 From: Nipun Garg Date: Tue, 30 Jul 2019 02:05:57 +0530 Subject: [PATCH] HDB: Check isDemo() first, otherwise it would crash by trying to load Demo GFX --- engines/hdb/menu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/hdb/menu.cpp b/engines/hdb/menu.cpp index 537035bcb33..9c36c9bd02b 100644 --- a/engines/hdb/menu.cpp +++ b/engines/hdb/menu.cpp @@ -687,15 +687,15 @@ void Menu::drawMenu() { g_hdb->_gfx->draw3DStars(); drawNebula(); - if (_quitActive == 2) { // XXXX + if (_quitActive == 3 || !g_hdb->isDemo()) { + if (!_quitScreen) + _quitScreen = g_hdb->_gfx->loadPic(PIC_QUITSCREEN); + _quitScreen->drawMasked(kQuitX, kQuitY); + } else if (_quitActive == 2) { // XXXX _screenshots1gfx->drawMasked(kQuitX, kQuitY); _screenshots2gfx->drawMasked(kQuitX, kScreenHeight - _screenshots2gfx->_height); } else if (_quitActive == 1) { _screenshots1agfx->drawMasked(kQuitX, kQuitY); - } else if (_quitActive == 3 || !g_hdb->isDemo()) { - if (!_quitScreen) - _quitScreen = g_hdb->_gfx->loadPic(PIC_QUITSCREEN); - _quitScreen->drawMasked(kQuitX, kQuitY); } } }