Skip to content
This repository
Browse code

Only add to preDeps when it's not in there.

  • Loading branch information...
commit cc39b66b38657787e99bf6369a77c993cd601c23 1 parent 3be9067
ulion authored March 24, 2013

Showing 1 changed file with 3 additions and 5 deletions. Show diff stats Hide diff stats

  1. 8  xbmc/addons/AddonInstaller.cpp
8  xbmc/addons/AddonInstaller.cpp
@@ -343,13 +343,11 @@ bool CAddonInstaller::CheckDependencies(const AddonPtr &addon,
343 343
     }
344 344
     // 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
345 345
     // TODO: should we assume that installed deps are OK?
346  
-    if (dep)
  346
+    if (dep && std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end())
347 347
     {
348  
-      if (std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end() &&
349  
-       !CheckDependencies(dep, preDeps))
  348
+      if (!CheckDependencies(dep, preDeps))
350 349
         return false;
351  
-      else
352  
-        preDeps.push_back(dep->ID());
  350
+      preDeps.push_back(dep->ID());
353 351
     }
354 352
   }
355 353
   return true;

0 notes on commit cc39b66

Please sign in to comment.
Something went wrong with that request. Please try again.