Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixes segfault on mythfrontend exit & related problems.

NetworkControl wasn't removing itself from the listener list when the object was
deleted causing a segfault when an event was received during shutdown.

Reviewed other instances of gCoreContext->addListener() and fixed one other
instances of this error.
(cherry picked from commit c7a1e81)

Refs #10359
  • Loading branch information...
commit 08dffd40a052cb65fa8e5a7f46232ec96ea998aa 1 parent 91a06b9
daniel-kristjansson authored March 30, 2012 stuartm committed April 08, 2012
2  mythtv/libs/libmythui/mythmainwindow.cpp
@@ -476,6 +476,8 @@ MythMainWindow::MythMainWindow(const bool useDB)
476 476
 
477 477
 MythMainWindow::~MythMainWindow()
478 478
 {
  479
+    gCoreContext->removeListener(this);
  480
+
479 481
     d->drawTimer->stop();
480 482
 
481 483
     while (!d->stackList.isEmpty())
2  mythtv/programs/mythfrontend/networkcontrol.cpp
@@ -225,6 +225,8 @@ NetworkControl::NetworkControl() :
225 225
 
226 226
 NetworkControl::~NetworkControl(void)
227 227
 {
  228
+    gCoreContext->removeListener(this);
  229
+
228 230
     clientLock.lock();
229 231
     while (!clients.isEmpty())
230 232
     {

0 notes on commit 08dffd4

Please sign in to comment.
Something went wrong with that request. Please try again.