diff options
Diffstat (limited to 'lldb')
| -rw-r--r-- | lldb/source/Core/ConstString.cpp | 9 | ||||
| -rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 11 |
2 files changed, 13 insertions, 7 deletions
diff --git a/lldb/source/Core/ConstString.cpp b/lldb/source/Core/ConstString.cpp index 572b481d09f..7dfc5534421 100644 --- a/lldb/source/Core/ConstString.cpp +++ b/lldb/source/Core/ConstString.cpp @@ -279,9 +279,12 @@ ConstString::Compare (const ConstString& lhs, const ConstString& rhs) void ConstString::Dump(Stream *s, const char *fail_value) const { - const char *cstr = AsCString (fail_value); - if (cstr) - s->PutCString (cstr); + if (s) + { + const char *cstr = AsCString (fail_value); + if (cstr) + s->PutCString (cstr); + } } void diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index d356ff68495..5109695ad20 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -524,10 +524,13 @@ FileSpec::Equal (const FileSpec& a, const FileSpec& b, bool full) void FileSpec::Dump(Stream *s) const { - m_directory.Dump(s); - if (m_directory) - s->PutChar('/'); - m_filename.Dump(s); + if (s) + { + m_directory.Dump(s); + if (m_directory) + s->PutChar('/'); + m_filename.Dump(s); + } } //------------------------------------------------------------------ |

