[lldb/Host] Fix crash in FileSystem::IsLocal

This checks `m_fs` before dereferencing it to access its`isLocal` method.

rdar://67410058

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
This commit is contained in:
Med Ismail Bennani 2022-02-25 18:33:31 -08:00
parent 425880ed35
commit 2dc6e906b0
No known key found for this signature in database
GPG Key ID: 9040401522D38F4E
1 changed files with 2 additions and 1 deletions

View File

@ -192,7 +192,8 @@ bool FileSystem::IsDirectory(const FileSpec &file_spec) const {
bool FileSystem::IsLocal(const Twine &path) const {
bool b = false;
m_fs->isLocal(path, b);
if (m_fs)
m_fs->isLocal(path, b);
return b;
}