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


_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to