diff options
author | amet <amet.nospam@gmail.com> | 2013-01-14 00:55:41 +0400 |
---|---|---|
committer | S. Davilla <davilla@4pi.com> | 2013-01-18 10:22:11 -0500 |
commit | 0a20a1d48d44aa154e7f4c05c8ae37584c80abbf (patch) | |
tree | 94a8996f3447c1e3fd935cbebcd9c237e15c8c13 | |
parent | 37ebf4619c42c030f667e2ae62a0a135bc38caf4 (diff) |
[fix] stop service addon before attempting to uninstall/delete it
-rw-r--r-- | xbmc/addons/AddonInstaller.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp index d273718aa5..dea044e54a 100644 --- a/xbmc/addons/AddonInstaller.cpp +++ b/xbmc/addons/AddonInstaller.cpp @@ -748,7 +748,12 @@ bool CAddonUnInstallJob::DoWork() // stop the pvr manager, so running pvr add-ons are stopped and closed PVR::CPVRManager::Get().Stop(); } - + if (m_addon->Type() == ADDON_SERVICE) + { + boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(m_addon); + if (service) + service->Stop(); + } if (!CAddonInstallJob::DeleteAddon(m_addon->Path())) return false; |