From 04353da1db7591f25209a323ed8b7ffa7dacb581 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Thu, 30 Dec 2010 23:41:46 +0000 Subject: [PATCH] Ensure that all screens parented to a screenstack are deleted before we delete the stack, we shouldn't get this to this point under normal use but it's better to be safe. --- mythtv/libs/libmythui/mythscreenstack.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mythtv/libs/libmythui/mythscreenstack.cpp b/mythtv/libs/libmythui/mythscreenstack.cpp index 8ea54ee3bb4..8446451ec89 100644 --- a/mythtv/libs/libmythui/mythscreenstack.cpp +++ b/mythtv/libs/libmythui/mythscreenstack.cpp @@ -33,6 +33,11 @@ MythScreenStack::MythScreenStack(MythMainWindow *parent, const QString &name, MythScreenStack::~MythScreenStack() { + while (!m_Children.isEmpty()) + { + MythScreenType *child = m_Children.back(); + PopScreen(child, false, true); // Don't fade, do delete + } } void MythScreenStack::EnableEffects(void)