diff --git a/lib/base.php b/lib/base.php
index 2cace2a0a06a84155c58e9b3855450044df63cf9..d6ef01ccbf729c768334c6db6cd4d0f1d3b82691 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -469,7 +469,12 @@ class OC {
 
 	public static function loadAppClassPaths() {
 		foreach (OC_APP::getEnabledApps() as $app) {
-			$file = OC_App::getAppPath($app) . '/appinfo/classpath.php';
+			$appPath = OC_App::getAppPath($app);
+			if ($appPath === false) {
+				continue;
+			}
+
+			$file = $appPath . '/appinfo/classpath.php';
 			if (file_exists($file)) {
 				require_once $file;
 			}