Skip to content
This repository
Browse code

fixed: addoninstaller unguarded null pointer after b0825b1

  • Loading branch information...
commit b5458130ba00c15ef468d6180a21994bff3daf42 1 parent c4d4916
Voyager1 authored March 23, 2013

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

  1. 11  xbmc/addons/AddonInstaller.cpp
11  xbmc/addons/AddonInstaller.cpp
@@ -343,13 +343,14 @@ 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 && 
347  
-       std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end() &&
348  
-       !CheckDependencies(dep, preDeps))
  346
+    if (dep)
349 347
     {
350  
-      return false;
  348
+      if (std::find(preDeps.begin(), preDeps.end(), dep->ID()) == preDeps.end() &&
  349
+       !CheckDependencies(dep, preDeps))
  350
+        return false;
  351
+      else
  352
+        preDeps.push_back(dep->ID());
351 353
     }
352  
-    preDeps.push_back(dep->ID());
353 354
   }
354 355
   return true;
355 356
 }

0 notes on commit b545813

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