[Scummvm-git-logs] scummvm master -> a5806ff9e155a82f379c696113c9f3e9d658f6fc
sev-
sev at scummvm.org
Tue Jul 13 08:30:41 UTC 2021
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c298ece898 SAGA2: Fix CID 1457983 which is false positive, but could prevent bugs in the future
5b19291ecb SAGA2: Fix memory leak in TileBank. CID 1458025
a5806ff9e1 SAGA2: Remove pointless checks. CID 1457961, 1458039
Commit: c298ece898ddc68583fdbc5898332092c0dd9649
https://github.com/scummvm/scummvm/commit/c298ece898ddc68583fdbc5898332092c0dd9649
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-13T10:30:24+02:00
Commit Message:
SAGA2: Fix CID 1457983 which is false positive, but could prevent bugs in the future
Changed paths:
engines/saga2/task.cpp
diff --git a/engines/saga2/task.cpp b/engines/saga2/task.cpp
index 67ffde4f75..06f8863bab 100644
--- a/engines/saga2/task.cpp
+++ b/engines/saga2/task.cpp
@@ -2039,7 +2039,8 @@ TaskResult HuntTask::update(void) {
}
// If there is a subtask, update it
- if (huntFlags & (huntGoto | huntWander)) subTask->update();
+ if ((huntFlags & (huntGoto | huntWander)) && subTask)
+ subTask->update();
// If we're not at the target, we know the hunt task is not
// done
@@ -2060,6 +2061,7 @@ void HuntTask::removeWanderTask(void) {
void HuntTask::removeGotoTask(void) {
subTask->abortTask();
delete subTask;
+ subTask = nullptr;
huntFlags &= ~huntGoto;
}
Commit: 5b19291ecb609410aa1d5ed6eaccb1fbb316e672
https://github.com/scummvm/scummvm/commit/5b19291ecb609410aa1d5ed6eaccb1fbb316e672
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-13T10:30:24+02:00
Commit Message:
SAGA2: Fix memory leak in TileBank. CID 1458025
Changed paths:
engines/saga2/tile.cpp
engines/saga2/tile.h
diff --git a/engines/saga2/tile.cpp b/engines/saga2/tile.cpp
index dd6c9f22eb..f0cbfa146a 100644
--- a/engines/saga2/tile.cpp
+++ b/engines/saga2/tile.cpp
@@ -1299,6 +1299,10 @@ TileBank::TileBank(Common::SeekableReadStream *stream) {
}
}
+TileBank::~TileBank() {
+ delete[] _tileArray;
+}
+
MapHeader::MapHeader(Common::SeekableReadStream *stream) {
size = stream->readSint16LE();
edgeType = stream->readSint16LE();
diff --git a/engines/saga2/tile.h b/engines/saga2/tile.h
index a7aa6fbc73..4418de854d 100644
--- a/engines/saga2/tile.h
+++ b/engines/saga2/tile.h
@@ -268,6 +268,7 @@ public:
}
TileBank(Common::SeekableReadStream *stream);
+ ~TileBank();
TileInfo *tile(uint16 index) {
return &_tileArray[index];
Commit: a5806ff9e155a82f379c696113c9f3e9d658f6fc
https://github.com/scummvm/scummvm/commit/a5806ff9e155a82f379c696113c9f3e9d658f6fc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-13T10:30:24+02:00
Commit Message:
SAGA2: Remove pointless checks. CID 1457961, 1458039
Changed paths:
engines/saga2/uidialog.cpp
diff --git a/engines/saga2/uidialog.cpp b/engines/saga2/uidialog.cpp
index 9ed60232b5..ef21ef7365 100644
--- a/engines/saga2/uidialog.cpp
+++ b/engines/saga2/uidialog.cpp
@@ -751,14 +751,11 @@ int16 FileDialog(int16 fileProcess) {
GameMode::update();
win->invalidate();
- //win->draw();
- //G_BASE.setActive(textBox);
EventLoop(rInfo.running, true);
-
// remove the window all attatched controls
- if (win) delete win;
+ delete win;
win = nullptr;
// unload all image arrays
@@ -938,7 +935,7 @@ int16 OptionsDialog(bool disableSaveResume) {
g_vm->saveConfig();
// remove the window all attatched controls
- if (win) delete win;
+ delete win;
win = nullptr;
// unload all image arrays
More information about the Scummvm-git-logs
mailing list