aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/ui
diff options
context:
space:
mode:
authorPeter Kohaut2019-02-12 23:04:00 +0100
committerPeter Kohaut2019-02-12 23:07:14 +0100
commitd8eb3c14a488fb7b678aab926de1a0d46ead8a46 (patch)
tree95b318f8597c8570eaad12481b805817fb4690d1 /engines/bladerunner/ui
parent37e083dcafd4e1243271760974f3671d8a537cf9 (diff)
downloadscummvm-rg350-d8eb3c14a488fb7b678aab926de1a0d46ead8a46.tar.gz
scummvm-rg350-d8eb3c14a488fb7b678aab926de1a0d46ead8a46.tar.bz2
scummvm-rg350-d8eb3c14a488fb7b678aab926de1a0d46ead8a46.zip
BLADERUNNER: Removal of memory leaks
Diffstat (limited to 'engines/bladerunner/ui')
-rw-r--r--engines/bladerunner/ui/kia.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/bladerunner/ui/kia.cpp b/engines/bladerunner/ui/kia.cpp
index 42aaf3c409..c889890276 100644
--- a/engines/bladerunner/ui/kia.cpp
+++ b/engines/bladerunner/ui/kia.cpp
@@ -110,6 +110,10 @@ KIA::KIA(BladeRunnerEngine *vm) {
}
KIA::~KIA() {
+ if (isOpen()) {
+ unload();
+ }
+
_thumbnail.free();
delete _crimesSection;
delete _suspectsSection;
@@ -150,7 +154,7 @@ void KIA::open(KIASections sectionId) {
return;
}
- if (!sectionId) {
+ if (sectionId == kKIASectionNone) {
unload();
return;
}