[Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.29.2.1,1.29.2.2
Travis Howell
kirben at users.sourceforge.net
Thu Jul 24 05:04:36 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv29264/simon
Modified Files:
Tag: branch-0-5-0
sound.cpp
Log Message:
Check before releasing memory
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.29.2.1
retrieving revision 1.29.2.2
diff -u -d -r1.29.2.1 -r1.29.2.2
--- sound.cpp 24 Jul 2003 10:21:17 -0000 1.29.2.1
+++ sound.cpp 24 Jul 2003 12:03:56 -0000 1.29.2.2
@@ -422,6 +422,9 @@
}
}
+ if (_voice)
+ delete _voice;
+
_voice = new RawSound(_mixer, file, 0, SOUND_BIG_ENDIAN);
}
@@ -434,6 +437,9 @@
if (file->isOpen() == false) {
warning("Can't open voice file %s", filename);
} else {
+ if (_voice)
+ delete _voice;
+
_voice = new WavSound(_mixer, file, _offsets);
}
}
More information about the Scummvm-git-logs
mailing list