From ee725078af0dc19aa2a2ad4a987febbee26ca046 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Sun, 1 Jun 2008 16:29:21 +0000 Subject: [PATCH] Fixed media player not exiting properly due to new boxstack code --- vaudioplayer.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vaudioplayer.cc b/vaudioplayer.cc index 821843c..b50feb3 100644 --- a/vaudioplayer.cc +++ b/vaudioplayer.cc @@ -68,6 +68,13 @@ AudioPlayer * VAudioplayer::getPlayer(bool createIfNeeded) VAudioplayer::~VAudioplayer() { + // Note from Chris: + // As of > 0.2.7 BoxStack has its own locking, this means returning 4 (delete me) + // in VAudioPlayer::handleCommand (case BACK) doesn't work as expected any more. + // BoxStack calls this destructor but BoxStack is locked at that point, so its not + // possible to call boxstack->remove(banner) here anymore. I left the call in, + // but inserted a destroyBanner() call in the handleCommand function. + if (banner) BoxStack::getInstance()->remove(banner); if (fullname) delete fullname; if (filename) delete filename; @@ -196,6 +203,7 @@ int VAudioplayer::handleCommand(int command) break; case Remote::BACK: { + destroyBanner(); // This line inserted to prevent BoxStack deadlock in this class destructor - Chris rt= 4; } break; -- 2.39.2