aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/Value.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 4bacc2949d..0150c7e6e9 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -128,7 +128,7 @@ const char *Value::getNameStart() const {
/// getNameLen - Return the length of the string, correctly handling nul
/// characters embedded into them.
unsigned Value::getNameLen() const {
- return Name->getKeyLength();
+ return Name ? Name->getKeyLength() : 0;
}