From b22625aa36d2373ea4cdfbea67048c2ea4ad94ed Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 13 Nov 2014 15:38:30 +0100 Subject: [PATCH] -try to fix segfault on webtv channel - neutrino shutdown --- src/driver/record.cpp | 3 +++ src/neutrino.cpp | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 61fe5c9c4..cf751e374 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -809,6 +809,9 @@ CRecordManager::~CRecordManager() } nextmap.clear(); durations.clear(); + sm.lock(); + manager = NULL; + sm.unlock(); } CRecordManager * CRecordManager::getInstance() diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6621d0b0a..8011608fc 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3199,9 +3199,6 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) } - delete cHddStat::getInstance(); - delete CRecordManager::getInstance(); - dprintf(DEBUG_INFO, "exit\n"); StopSubtitles(); stopPlayBack(); @@ -3209,6 +3206,9 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode) frameBuffer->paintBackground(); videoDecoder->ShowPicture(DATADIR "/neutrino/icons/shutdown.jpg"); + delete cHddStat::getInstance(); + delete CRecordManager::getInstance(); + CEpgScan::getInstance()->Stop(); if(g_settings.epg_save /* && timeset && g_Sectionsd->getIsTimeSet ()*/) { g_Sectionsd->setPauseScanning(true);