[Lldb-commits] [lldb] r251663 - Do not accept nullptr descriptions as valid summaries to be printed

Enrico Granata via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 29 15:29:06 PDT 2015


Author: enrico
Date: Thu Oct 29 17:29:06 2015
New Revision: 251663

URL: http://llvm.org/viewvc/llvm-project?rev=251663&view=rev
Log:
Do not accept nullptr descriptions as valid summaries to be printed

Modified:
    lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp

Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=251663&r1=251662&r2=251663&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Thu Oct 29 17:29:06 2015
@@ -945,8 +945,13 @@ lldb_private::formatters::GetOSXEpoch ()
 bool
 lldb_private::formatters::RuntimeSpecificDescriptionSummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options)
 {
-    stream.Printf("%s",valobj.GetObjectDescription());
-    return true;
+    if (const char* description = valobj.GetObjectDescription())
+    {
+        stream.Printf("%s", description);
+        return true;
+    }
+    else
+        return false;
 }
 
 template bool




More information about the lldb-commits mailing list