Skip to content
This repository
Browse code

Merge pull request #2489 from Voyager1/fix_addoninstaller_np

fixed: addoninstaller unguarded null pointer after #2475
  • Loading branch information...
commit 3be9067643ca48d94cb9428d7989818760273f8f 2 parents 5cf890c + b545813
ulion authored

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 3be9067

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