diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:50:09 +0000 |
commit | f3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch) | |
tree | 48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /include/lldb/Core/MappedHash.h | |
parent | 2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff) |
Notes
Diffstat (limited to 'include/lldb/Core/MappedHash.h')
-rw-r--r-- | include/lldb/Core/MappedHash.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/lldb/Core/MappedHash.h b/include/lldb/Core/MappedHash.h index 5a52ab2b8b2d5..b7cf3b02e01e8 100644 --- a/include/lldb/Core/MappedHash.h +++ b/include/lldb/Core/MappedHash.h @@ -47,6 +47,9 @@ public: static uint32_t HashString (uint32_t hash_function, const char *s) { + if (!s) + return 0; + switch (hash_function) { case MappedHash::eHashFunctionDJB: @@ -434,6 +437,9 @@ public: bool Find (const char *name, Pair &pair) const { + if (!name || !name[0]) + return false; + if (IsValid ()) { const uint32_t bucket_count = m_header.bucket_count; |