aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2019-07-05 21:16:22 -0700
committerPaul Gilbert2019-07-06 15:27:09 -0700
commit4c014a105cf170efa4a57ae8231e256a8eb32e90 (patch)
tree13ac8a1817617f4821941d135f6db458f6bc22dc /engines
parent69f87bebf125b1be5e6d6cfe3432b417d5ca505e (diff)
downloadscummvm-rg350-4c014a105cf170efa4a57ae8231e256a8eb32e90.tar.gz
scummvm-rg350-4c014a105cf170efa4a57ae8231e256a8eb32e90.tar.bz2
scummvm-rg350-4c014a105cf170efa4a57ae8231e256a8eb32e90.zip
GLK: Properly free pair window children on exit
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/window_pair.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/glk/window_pair.cpp b/engines/glk/window_pair.cpp
index 8de16a0566..e564e54b76 100644
--- a/engines/glk/window_pair.cpp
+++ b/engines/glk/window_pair.cpp
@@ -39,8 +39,10 @@ PairWindow::PairWindow(Windows *windows, uint method, Window *key, uint size) :
}
PairWindow::~PairWindow() {
- for (uint idx = 0; idx < _children.size(); ++idx)
+ for (uint idx = 0; idx < _children.size(); ++idx) {
+ _children[idx]->_parent = nullptr;
delete _children[idx];
+ }
}
void PairWindow::rearrange(const Rect &box) {