summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-12-22 17:03:37 +0000
committerJim Ingham <jingham@apple.com>2011-12-22 17:03:37 +0000
commitb7c91a27fb6d8f34800cbc568ebed91b8b10d758 (patch)
treeb1944b83abedc08fce42b513a3ffbee60a0de531 /lldb
parentf5bde09cc1d98fbeddbdf29cbe4de4e19c964200 (diff)
downloadbcm5719-llvm-b7c91a27fb6d8f34800cbc568ebed91b8b10d758.tar.gz
bcm5719-llvm-b7c91a27fb6d8f34800cbc568ebed91b8b10d758.zip
Add check for non-NULL Variable with a NULL Type.
llvm-svn: 147149
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Core/Value.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp
index c380d76fe2b..c2589f33a89 100644
--- a/lldb/source/Core/Value.cpp
+++ b/lldb/source/Core/Value.cpp
@@ -213,7 +213,12 @@ Value::GetValueByteSize (clang::ASTContext *ast_context, Error *error_ptr)
case eContextTypeVariable: // Variable *
if (GetVariable())
- byte_size = GetVariable()->GetType()->GetByteSize();
+ {
+ if (GetVariable()->GetType())
+ byte_size = GetVariable()->GetType()->GetByteSize();
+ else if (error_ptr)
+ error_ptr->SetErrorString ("Can't determine byte size with NULL Type *.");
+ }
else if (error_ptr)
error_ptr->SetErrorString ("Can't determine byte size with NULL Variable *.");
break;
OpenPOWER on IntegriCloud