diff options
| author | RichieSams | 2013-10-01 17:02:44 -0500 |
|---|---|---|
| committer | RichieSams | 2013-10-02 09:09:51 -0500 |
| commit | db28babf066b83576a5d9b67d5c7e29c931fbb66 (patch) | |
| tree | 31d7ec0dc6d1f952424908c067f717d96497b666 /engines | |
| parent | 3c8c4c836f2ac544570f032516aa2e90bc2dd4bf (diff) | |
| download | scummvm-rg350-db28babf066b83576a5d9b67d5c7e29c931fbb66.tar.gz scummvm-rg350-db28babf066b83576a5d9b67d5c7e29c931fbb66.tar.bz2 scummvm-rg350-db28babf066b83576a5d9b67d5c7e29c931fbb66.zip | |
ZVISION: Create file on the heap to prevent memory scope problems
Diffstat (limited to 'engines')
| -rw-r--r-- | engines/zvision/actions.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/zvision/actions.cpp b/engines/zvision/actions.cpp index 461c4493eb..75b771c143 100644 --- a/engines/zvision/actions.cpp +++ b/engines/zvision/actions.cpp @@ -180,9 +180,9 @@ bool ActionMusic::execute(ZVision *engine) { Audio::RewindableAudioStream *audioStream; if (_fileName.contains(".wav")) { - Common::File file; - if (file.open(_fileName)) { - audioStream = Audio::makeWAVStream(&file, DisposeAfterUse::NO); + Common::File *file = new Common::File(); + if (file->open(_fileName)) { + audioStream = Audio::makeWAVStream(file, DisposeAfterUse::YES); } } else { audioStream = makeRawZorkStream(_fileName, engine); |
