Introduced a null check to avoid a crash in a test on i386.
authorSean Callanan <scallanan@apple.com>
Thu, 29 Sep 2016 00:16:37 +0000 (00:16 +0000)
committerSean Callanan <scallanan@apple.com>
Thu, 29 Sep 2016 00:16:37 +0000 (00:16 +0000)
llvm-svn: 282653

lldb/source/Target/StackFrame.cpp

index 22937c7..9630d03 100644 (file)
@@ -1419,6 +1419,10 @@ ValueObjectSP GetValueForDereferincingOffset(StackFrame &frame,
 
   Error error;
   ValueObjectSP pointee = base->Dereference(error);
+    
+  if (!pointee) {
+    return ValueObjectSP();
+  }
 
   if (offset >= 0 && uint64_t(offset) >= pointee->GetByteSize()) {
     int64_t index = offset / pointee->GetByteSize();