aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmarshallnz <jcmarsha@gmail.com>2014-05-18 11:25:41 +1200
committerjmarshallnz <jcmarsha@gmail.com>2014-05-18 11:25:41 +1200
commitb4bffcf43c46d2940a409d1274d576ff96fc3839 (patch)
tree6f2f321bda3b61fbc30a0be6448b82832a2dc316
parent834be88ae36f754239ccef111717d8f95a284653 (diff)
parent6c1082f202384eb170f067c0cf639c4e0179eccb (diff)
Merge pull request #4730 from Montellese/gotham_announcement_fix
deinitialize CAnnouncementManager before stopping all (network) services
-rw-r--r--xbmc/Application.cpp2
-rw-r--r--xbmc/interfaces/AnnouncementManager.cpp6
-rw-r--r--xbmc/interfaces/AnnouncementManager.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/xbmc/Application.cpp b/xbmc/Application.cpp
index 0561286879..9242d5363f 100644
--- a/xbmc/Application.cpp
+++ b/xbmc/Application.cpp
@@ -3555,6 +3555,8 @@ void CApplication::Stop(int exitCode)
CLog::Log(LOGNOTICE, "stop player");
m_pPlayer->ClosePlayer();
+ CAnnouncementManager::Deinitialize();
+
StopPVRManager();
StopServices();
//Sleep(5000);
diff --git a/xbmc/interfaces/AnnouncementManager.cpp b/xbmc/interfaces/AnnouncementManager.cpp
index 287f5a4715..2932e59aba 100644
--- a/xbmc/interfaces/AnnouncementManager.cpp
+++ b/xbmc/interfaces/AnnouncementManager.cpp
@@ -39,6 +39,12 @@ using namespace ANNOUNCEMENT;
#define m_announcers XBMC_GLOBAL_USE(ANNOUNCEMENT::CAnnouncementManager::Globals).m_announcers
#define m_critSection XBMC_GLOBAL_USE(ANNOUNCEMENT::CAnnouncementManager::Globals).m_critSection
+void CAnnouncementManager::Deinitialize()
+{
+ CSingleLock lock (m_critSection);
+ m_announcers.clear();
+}
+
void CAnnouncementManager::AddAnnouncer(IAnnouncer *listener)
{
if (!listener)
diff --git a/xbmc/interfaces/AnnouncementManager.h b/xbmc/interfaces/AnnouncementManager.h
index b8f1a7b37d..6f4208d97c 100644
--- a/xbmc/interfaces/AnnouncementManager.h
+++ b/xbmc/interfaces/AnnouncementManager.h
@@ -38,6 +38,8 @@ namespace ANNOUNCEMENT
std::vector<IAnnouncer *> m_announcers;
};
+ static void Deinitialize();
+
static void AddAnnouncer(IAnnouncer *listener);
static void RemoveAnnouncer(IAnnouncer *listener);
static void Announce(AnnouncementFlag flag, const char *sender, const char *message);