diff options
-rw-r--r-- | common/file.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/file.cpp b/common/file.cpp index abb2cda494..76a9f94505 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -37,7 +37,8 @@ void File::addDefaultDirectory(const String &directory) { } void File::addDefaultDirectory(const FSNode &dir) { - SearchMan.addDirectory(dir.getPath(), dir); + if (dir.exists() && dir.isDirectory()) + SearchMan.addDirectory(dir.getPath(), dir); } File::File() |