aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeljko Ametovic <amet1977@gmail.com>2013-01-13 10:40:59 -0800
committerZeljko Ametovic <amet1977@gmail.com>2013-01-13 10:40:59 -0800
commit58eb6a92567bbef7c0952ad47f296f729bee0641 (patch)
treea71ea3c0d8ee5aaba8a4262903109951d53d7dc2
parent2d7375361d21073b072617f645b378f2c574e157 (diff)
parent8e92cce5f2b811162c50cbb10a839da79b1666dd (diff)
Merge pull request #2069 from amet/service_addon_stop
[fix] make sure we actually stop the service addon before upgrading it
-rw-r--r--xbmc/addons/AddonInstaller.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/xbmc/addons/AddonInstaller.cpp b/xbmc/addons/AddonInstaller.cpp
index 1d7614e9ba..d273718aa5 100644
--- a/xbmc/addons/AddonInstaller.cpp
+++ b/xbmc/addons/AddonInstaller.cpp
@@ -556,7 +556,9 @@ bool CAddonInstallJob::OnPreInstall()
if (m_addon->Type() == ADDON_SERVICE)
{
- boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(m_addon);
+ AddonPtr addon;
+ ADDON::CAddonMgr::Get().GetAddon(m_addon->ID(), addon);
+ boost::shared_ptr<CService> service = boost::dynamic_pointer_cast<CService>(addon);
if (service)
service->Stop();
return true;