[Lldb-commits] [lldb] r147149 - /lldb/trunk/source/Core/Value.cpp

Jim Ingham jingham at apple.com
Thu Dec 22 09:03:38 PST 2011


Author: jingham
Date: Thu Dec 22 11:03:37 2011
New Revision: 147149

URL: http://llvm.org/viewvc/llvm-project?rev=147149&view=rev
Log:
Add check for non-NULL Variable with a NULL Type.

Modified:
    lldb/trunk/source/Core/Value.cpp

Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=147149&r1=147148&r2=147149&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Thu Dec 22 11:03:37 2011
@@ -213,7 +213,12 @@
 
     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;





More information about the lldb-commits mailing list