diff options
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; |

