mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-12 04:36:15 +00:00
DIRECTOR: Fix memory leaks
This commit is contained in:
parent
0c940567dd
commit
edb2edf3f4
@ -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");
|
warning("STUB: func_cursor(): Hotspot is the registration point of the cast member");
|
||||||
_vm->getMacWindowManager()->pushCustomCursor(assembly, 16, 16, 1, 1, 3);
|
_vm->getMacWindowManager()->pushCustomCursor(assembly, 16, 16, 1, 1, 3);
|
||||||
|
|
||||||
|
free(assembly);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,13 +88,14 @@ void DirectorSound::playFile(Common::String filename, uint8 soundChannel) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DirectorSound::playWAV(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()) {
|
if (soundChannel == 0 || soundChannel > _channels.size()) {
|
||||||
warning("Invalid sound channel %d", soundChannel);
|
warning("Invalid sound channel %d", soundChannel);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::File *file = new Common::File();
|
||||||
|
|
||||||
if (!file->open(filename)) {
|
if (!file->open(filename)) {
|
||||||
warning("Failed to open %s", filename.c_str());
|
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) {
|
void DirectorSound::playAIFF(Common::String filename, uint8 soundChannel) {
|
||||||
Common::File *file = new Common::File();
|
|
||||||
|
|
||||||
if (soundChannel == 0 || soundChannel > _channels.size()) {
|
if (soundChannel == 0 || soundChannel > _channels.size()) {
|
||||||
warning("Invalid sound channel %d", soundChannel);
|
warning("Invalid sound channel %d", soundChannel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Common::File *file = new Common::File();
|
||||||
|
|
||||||
if (!file->open(filename)) {
|
if (!file->open(filename)) {
|
||||||
warning("Failed to open %s", filename.c_str());
|
warning("Failed to open %s", filename.c_str());
|
||||||
delete file;
|
delete file;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user