Skip to content

Commit 2dc6e90

Browse files
committed
[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 <[email protected]>
1 parent 425880e commit 2dc6e90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lldb/source/Host/common/FileSystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ bool FileSystem::IsDirectory(const FileSpec &file_spec) const {
192192

193193
bool FileSystem::IsLocal(const Twine &path) const {
194194
bool b = false;
195-
m_fs->isLocal(path, b);
195+
if (m_fs)
196+
m_fs->isLocal(path, b);
196197
return b;
197198
}
198199

0 commit comments

Comments
 (0)