diff options
author | Zachary Turner <zturner@google.com> | 2014-08-08 23:54:35 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2014-08-08 23:54:35 +0000 |
commit | b6d9924439c902f8683dc62d3b3fb4a56e2fe9e6 (patch) | |
tree | c32c94759256c53584de4a4817f20e7395c56b36 | |
parent | c4ea74a719115b9b663ae23370567420c6626966 (diff) | |
download | bcm5719-llvm-b6d9924439c902f8683dc62d3b3fb4a56e2fe9e6.tar.gz bcm5719-llvm-b6d9924439c902f8683dc62d3b3fb4a56e2fe9e6.zip |
Fix bug causing FileSpec::GetPath() to crash with a null dest.
llvm-svn: 215262
-rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index 615772e08bd..7a12d2fef55 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -657,6 +657,9 @@ FileSpec::GetFilename() const size_t FileSpec::GetPath(char *path, size_t path_max_len, bool denormalize) const { + if (!path) + return 0; + std::string result = GetPath(denormalize); size_t result_length = std::min(path_max_len-1, result.length()); |