Skip to content

Commit

Permalink
[lldb/Host] Fix crash in FileSystem::IsLocal
Browse files Browse the repository at this point in the history
This checks `m_fs` before dereferencing it to access its`isLocal` method.

rdar://67410058

Signed-off-by: Med Ismail Bennani <medismail.bennani@gmail.com>
  • Loading branch information
medismailben committed Feb 26, 2022
1 parent 425880e commit 2dc6e90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lldb/source/Host/common/FileSystem.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2dc6e90

Please sign in to comment.