Permalink
Browse files

added: Deinit to the addons manager to ensure we unload cpluff prior …

…to the dll loader clobbering it.

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@29853 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
  • Loading branch information...
1 parent 154cfb0 commit 37a994ea60f731bf8ce006890ad70045b15cadc5 jmarshallnz committed May 6, 2010
Showing with 11 additions and 2 deletions.
  1. +2 −0 xbmc/Application.cpp
  2. +8 −2 xbmc/addons/AddonManager.cpp
  3. +1 −0 xbmc/addons/AddonManager.h
View
2 xbmc/Application.cpp
@@ -3152,6 +3152,8 @@ bool CApplication::Cleanup()
g_windowManager.Remove(WINDOW_DIALOG_SEEK_BAR);
g_windowManager.Remove(WINDOW_DIALOG_VOLUME_BAR);
+ CAddonMgr::Get().DeInit();
+
CLog::Log(LOGNOTICE, "unload sections");
CSectionLoader::UnloadAll();
View
10 xbmc/addons/AddonManager.cpp
@@ -96,8 +96,7 @@ CAddonMgr::CAddonMgr()
CAddonMgr::~CAddonMgr()
{
- if(m_cpluff)
- m_cpluff->destroy();
+ DeInit();
}
CAddonMgr &CAddonMgr::Get()
@@ -178,6 +177,13 @@ bool CAddonMgr::Init()
return true;
}
+void CAddonMgr::DeInit()
+{
+ if (m_cpluff)
+ m_cpluff->destroy();
+ m_cpluff = NULL;
+}
+
bool CAddonMgr::HasAddons(const TYPE &type, const CONTENT_TYPE &content/*= CONTENT_NONE*/, bool enabledOnly/*= true*/)
{
if (type == ADDON_SCREENSAVER || type == ADDON_SKIN)
View
1 xbmc/addons/AddonManager.h
@@ -75,6 +75,7 @@ namespace ADDON
public:
static CAddonMgr &Get();
bool Init();
+ void DeInit();
IAddonMgrCallback* GetCallbackForType(TYPE type);
bool RegisterAddonMgrCallback(TYPE type, IAddonMgrCallback* cb);

0 comments on commit 37a994e

Please sign in to comment.