Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
Only log about stopping or destroying a DLL if it was actually stoppe…
Browse files Browse the repository at this point in the history
…d or destroyed
  • Loading branch information
garbear committed Aug 4, 2012
1 parent 87f3fac commit b9d1ac8
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions xbmc/addons/AddonDll.h
Expand Up @@ -234,13 +234,16 @@ void CAddonDll<TheDll, TheStruct, TheProps>::Stop()
} }
CAddon::SaveSettings(); CAddon::SaveSettings();
} }
if (m_pDll) m_pDll->Stop(); if (m_pDll)
{
m_pDll->Stop();
CLog::Log(LOGINFO, "ADDON: Dll Stopped - %s", Name().c_str());
}
} }
catch (std::exception &e) catch (std::exception &e)
{ {
HandleException(e, "m_pDll->Stop"); HandleException(e, "m_pDll->Stop");
} }
CLog::Log(LOGINFO, "ADDON: Dll Stopped - %s", Name().c_str());
} }


template<class TheDll, typename TheStruct, typename TheProps> template<class TheDll, typename TheStruct, typename TheProps>
Expand All @@ -261,10 +264,13 @@ void CAddonDll<TheDll, TheStruct, TheProps>::Destroy()
} }
free(m_pStruct); free(m_pStruct);
m_pStruct = NULL; m_pStruct = NULL;
delete m_pDll; if (m_pDll)
m_pDll = NULL; {
delete m_pDll;
m_pDll = NULL;
CLog::Log(LOGINFO, "ADDON: Dll Destroyed - %s", Name().c_str());
}
m_initialized = false; m_initialized = false;
CLog::Log(LOGINFO, "ADDON: Dll Destroyed - %s", Name().c_str());
} }


template<class TheDll, typename TheStruct, typename TheProps> template<class TheDll, typename TheStruct, typename TheProps>
Expand Down

0 comments on commit b9d1ac8

Please sign in to comment.