Skip to content

Commit

Permalink
fixed: binary add-on child dll handling
Browse files Browse the repository at this point in the history
  • Loading branch information
notspiff authored and FernetMenta committed Mar 3, 2015
1 parent a9b8c36 commit 0e239b4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xbmc/addons/AddonDll.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,10 @@ bool CAddonDll<TheDll, TheStruct, TheProps>::LoadDll()
strFileName = LibPath();
}
else
{ //FIXME hack to load same Dll twice
{
std::string extension = URIUtils::GetExtension(m_strLibName);
strFileName = "special://temp/" + m_strLibName;
URIUtils::RemoveExtension(strFileName);
strFileName += "-" + ID() + extension;
strFileName = "special://temp/" + ID() + "-%03d" + extension;
strFileName = CUtil::GetNextFilename(strFileName, 100);

if (!XFILE::CFile::Exists(strFileName))
XFILE::CFile::Copy(LibPath(), strFileName);
Expand Down Expand Up @@ -331,6 +330,8 @@ void CAddonDll<TheDll, TheStruct, TheProps>::Destroy()
m_pStruct = NULL;
if (m_pDll)
{
if (m_bIsChild)
XFILE::CFile::Delete(m_pDll->GetFile());
delete m_pDll;
m_pDll = NULL;
CLog::Log(LOGINFO, "ADDON: Dll Destroyed - %s", Name().c_str());
Expand Down

0 comments on commit 0e239b4

Please sign in to comment.