SCUMM: Fix crash when compressded files are detected

We call Dialog::runModal() which in turn, calls pauseEngine().

At this point, SMUSH player is not yet initialized, but our implementation
calls _splayer->pause() which leads to a crash on Android.
This commit is contained in:
Eugene Sandulenko 2023-03-19 12:25:44 +01:00
parent acf6280fbe
commit ef9b6c9b45
No known key found for this signature in database
GPG key ID: 014D387312D34F08

View file

@ -3338,10 +3338,12 @@ void ScummEngine::pauseEngineIntern(bool pause) {
#ifdef ENABLE_SCUMM_7_8
void ScummEngine_v7::pauseEngineIntern(bool pause) {
if (pause) {
_splayer->pause();
} else {
_splayer->unpause();
if (_splayer) { // We may call it from setupScumm() before _splayer is inited
if (pause) {
_splayer->pause();
} else {
_splayer->unpause();
}
}
ScummEngine::pauseEngineIntern(pause);