SAGA2: Fix more memory-related errors

This commit is contained in:
a/ 2021-06-02 22:52:19 +09:00 committed by Eugene Sandulenko
parent 238c445ba3
commit 78d8cf362e
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 4 additions and 4 deletions

View File

@ -155,8 +155,8 @@ public:
~frameSmoother() {
if (frameHistory) delete frameHistory;
frameHistory = NULL;
if (frameHistory) delete[] frameHistory;
frameHistory = nullptr;
}
virtual void updateFrameCount(void) {

View File

@ -242,13 +242,12 @@ void startAudio(void) {
(uint32) 400000 // sound buffer size
);
warning("STUB: startAudio, sync sound settings");
#if 0
disMusic = !GetPrivateProfileInt("Sound", "Music", 1, iniFile);
disVoice = !GetPrivateProfileInt("Sound", "Voice", 1, iniFile);
disLoops = !GetPrivateProfileInt("Sound", "Loops", 1, iniFile);
disSound = !GetPrivateProfileInt("Sound", "Sound", 1, iniFile);
#endif
warning("STUB: startAudio, sync sound settings");
assert(audio);
if (audio->active()) {
@ -350,6 +349,7 @@ void startAudio(void) {
audio->disable(volLoops);
if (disSound)
audio->disable(volSound);
#endif
}
//-----------------------------------------------------------------------