From 4c014a105cf170efa4a57ae8231e256a8eb32e90 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 5 Jul 2019 21:16:22 -0700 Subject: GLK: Properly free pair window children on exit --- engines/glk/window_pair.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines') 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) { -- cgit v1.2.3