Fix a null dereference in the LLDB data formatters.
authorAdrian Prantl <aprantl@apple.com>
Wed, 26 Feb 2020 00:42:53 +0000 (16:42 -0800)
committerAdrian Prantl <aprantl@apple.com>
Wed, 26 Feb 2020 00:43:55 +0000 (16:43 -0800)
llvm/utils/lldbDataFormatters.py

index 74f3222..98c9099 100644 (file)
@@ -118,7 +118,9 @@ def SmallStringSummaryProvider(valobj, internal_dict):
     num_elements = valobj.GetNumChildren()
     res = "\""
     for i in range(0, num_elements):
-      res += valobj.GetChildAtIndex(i).GetValue().strip("'")
+        c = valobj.GetChildAtIndex(i).GetValue()
+        if c:
+            res += c.strip("'")
     res += "\""
     return res