diff options
| author | Jim Ingham <jingham@apple.com> | 2011-12-22 17:03:37 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2011-12-22 17:03:37 +0000 |
| commit | b7c91a27fb6d8f34800cbc568ebed91b8b10d758 (patch) | |
| tree | b1944b83abedc08fce42b513a3ffbee60a0de531 /lldb | |
| parent | f5bde09cc1d98fbeddbdf29cbe4de4e19c964200 (diff) | |
| download | bcm5719-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.cpp | 7 |
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; |

