From 57caa940815f598c6f50b61c066253df85862ba5 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 13 May 2009 11:43:24 +0000 Subject: Moved the construction of _sound and _music to the constructor, in case the run() method exits before initiaze is called svn-id: r40520 --- engines/cruise/cruise.cpp | 5 ++--- 1 file 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() { -- cgit v1.2.3