From b5e817d638afcbdb86f6f8ffd6e92348c2454d3e Mon Sep 17 00:00:00 2001
From: Robin Appelman <icewind@owncloud.com>
Date: Sun, 2 Jun 2013 21:44:24 +0200
Subject: [PATCH] fix clearing mounts when filesystem isn't initialized yet

---
 lib/files/filesystem.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/files/filesystem.php b/lib/files/filesystem.php
index 02cce001b4..7e0bcfd1a2 100644
--- a/lib/files/filesystem.php
+++ b/lib/files/filesystem.php
@@ -359,7 +359,9 @@ class Filesystem {
 	 * clear all mounts and storage backends
 	 */
 	public static function clearMounts() {
-		self::$mounts->clear();
+		if (self::$mounts) {
+			self::$mounts->clear();
+		}
 	}
 
 	/**
-- 
GitLab