diff --git a/engines/director/lingo/lingo-funcs.cpp b/engines/director/lingo/lingo-funcs.cpp index 7a75923e2fb..be1e5909dad 100644 --- a/engines/director/lingo/lingo-funcs.cpp +++ b/engines/director/lingo/lingo-funcs.cpp @@ -399,6 +399,8 @@ void Lingo::func_cursor(int c, int m) { warning("STUB: func_cursor(): Hotspot is the registration point of the cast member"); _vm->getMacWindowManager()->pushCustomCursor(assembly, 16, 16, 1, 1, 3); + free(assembly); + return; } diff --git a/engines/director/sound.cpp b/engines/director/sound.cpp index 009b69b15a2..79fb1ded346 100644 --- a/engines/director/sound.cpp +++ b/engines/director/sound.cpp @@ -88,13 +88,14 @@ void DirectorSound::playFile(Common::String filename, uint8 soundChannel) { } void DirectorSound::playWAV(Common::String filename, uint8 soundChannel) { - Common::File *file = new Common::File(); - if (soundChannel == 0 || soundChannel > _channels.size()) { warning("Invalid sound channel %d", soundChannel); + return; } + Common::File *file = new Common::File(); + if (!file->open(filename)) { warning("Failed to open %s", filename.c_str()); @@ -110,13 +111,13 @@ void DirectorSound::playWAV(Common::String filename, uint8 soundChannel) { } void DirectorSound::playAIFF(Common::String filename, uint8 soundChannel) { - Common::File *file = new Common::File(); - if (soundChannel == 0 || soundChannel > _channels.size()) { warning("Invalid sound channel %d", soundChannel); return; } + Common::File *file = new Common::File(); + if (!file->open(filename)) { warning("Failed to open %s", filename.c_str()); delete file;