[Scummvm-git-logs] scummvm branch-2-9 -> 355b30be73d6110062459885a1ea4f29cc8062f1
sev-
noreply at scummvm.org
Wed May 28 09:49:05 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
355b30be73 PRINCE: Fix crash on early error()
Commit: 355b30be73d6110062459885a1ea4f29cc8062f1
https://github.com/scummvm/scummvm/commit/355b30be73d6110062459885a1ea4f29cc8062f1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-05-28T11:48:58+02:00
Commit Message:
PRINCE: Fix crash on early error()
If error() is called in PrinceEngine::init() at an early stage,
before _midiPlayer was instantiated, then pauseEngineIntern()
will lead to a crash.
Do a sanity check here.
Changed paths:
engines/prince/prince.cpp
diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index a573a054906..07511785853 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -449,10 +449,13 @@ Common::Error PrinceEngine::run() {
void PrinceEngine::pauseEngineIntern(bool pause) {
Engine::pauseEngineIntern(pause);
- if (pause) {
- _midiPlayer->pause();
- } else {
- _midiPlayer->resume();
+
+ if (_midiPlayer) {
+ if (pause) {
+ _midiPlayer->pause();
+ } else {
+ _midiPlayer->resume();
+ }
}
}
More information about the Scummvm-git-logs
mailing list