aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2009-05-13 11:43:24 +0000
committerPaul Gilbert2009-05-13 11:43:24 +0000
commit57caa940815f598c6f50b61c066253df85862ba5 (patch)
tree3fe08618d9698a17b622cf19eb3bb3d6ae40600a /engines
parent37a0157c970ee710ea704836d68a4c8dbd24d457 (diff)
downloadscummvm-rg350-57caa940815f598c6f50b61c066253df85862ba5.tar.gz
scummvm-rg350-57caa940815f598c6f50b61c066253df85862ba5.tar.bz2
scummvm-rg350-57caa940815f598c6f50b61c066253df85862ba5.zip
Moved the construction of _sound and _music to the constructor, in case the run() method exits before initiaze is called
svn-id: r40520
Diffstat (limited to 'engines')
-rw-r--r--engines/cruise/cruise.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index ed8cf5f47b..b7fd0def8b 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -62,6 +62,8 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
_vm = this;
_debugger = new Debugger();
+ _music = new MusicPlayer();
+ _sound = new SoundPlayer();
syst->getEventManager()->registerRandomSource(_rnd, "cruise");
}
@@ -131,9 +133,6 @@ void CruiseEngine::initialize() {
_driver = MidiDriver::createMidi(midiDriver);
if (_mt32)
_driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
-
- _music = new MusicPlayer();
- _sound = new SoundPlayer();
}
bool CruiseEngine::loadLanguageStrings() {