diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2014-05-18 11:25:41 +1200 |
---|---|---|
committer | jmarshallnz <jcmarsha@gmail.com> | 2014-05-18 11:25:41 +1200 |
commit | b4bffcf43c46d2940a409d1274d576ff96fc3839 (patch) | |
tree | 6f2f321bda3b61fbc30a0be6448b82832a2dc316 | |
parent | 834be88ae36f754239ccef111717d8f95a284653 (diff) | |
parent | 6c1082f202384eb170f067c0cf639c4e0179eccb (diff) |
Merge pull request #4730 from Montellese/gotham_announcement_fix
deinitialize CAnnouncementManager before stopping all (network) services
-rw-r--r-- | xbmc/Application.cpp | 2 | ||||
-rw-r--r-- | xbmc/interfaces/AnnouncementManager.cpp | 6 | ||||
-rw-r--r-- | xbmc/interfaces/AnnouncementManager.h | 2 |
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); |