Skip to content

Commit

Permalink
Merge pull request xbmc#2489 from Voyager1/fix_addoninstaller_np
Browse files Browse the repository at this point in the history
fixed: addoninstaller unguarded null pointer after xbmc#2475
  • Loading branch information
ulion committed Mar 23, 2013
2 parents 5cf890c + b545813 commit 3be9067
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions xbmc/addons/AddonInstaller.cpp
Expand Up @@ -343,13 +343,14 @@ bool CAddonInstaller::CheckDependencies(const AddonPtr &addon,
}
// at this point we have our dep, or the dep is optional (and we don't have it) so check that it's OK as well
// TODO: should we assume that installed deps are OK?
if (dep &&
std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end() &&
!CheckDependencies(dep, preDeps))
if (dep)
{
return false;
if (std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end() &&
!CheckDependencies(dep, preDeps))
return false;
else
preDeps.push_back(dep->ID());
}
preDeps.push_back(dep->ID());
}
return true;
}
Expand Down

0 comments on commit 3be9067

Please sign in to comment.