[Lldb-commits] [lldb] r149338 - /lldb/trunk/source/Commands/CommandObjectType.cpp

Enrico Granata granata.enrico at gmail.com
Mon Jan 30 18:21:46 PST 2012


Author: enrico
Date: Mon Jan 30 20:21:45 2012
New Revision: 149338

URL: http://llvm.org/viewvc/llvm-project?rev=149338&view=rev
Log:
quick fixes for two issues that were causing LLDB to crash

Modified:
    lldb/trunk/source/Commands/CommandObjectType.cpp

Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=149338&r1=149337&r2=149338&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Mon Jan 30 20:21:45 2012
@@ -929,8 +929,11 @@
         }
         else
         {
-            out_stream->PutCString (error.AsCString());
-            out_stream->Flush();
+            if (error.AsCString())
+            {
+                out_stream->PutCString (error.AsCString());
+                out_stream->Flush();
+            }
             return;
         }
     }
@@ -1571,7 +1574,7 @@
         
         if (m_options.m_delete_all)
         {
-            DataVisualization::Categories::LoopThrough(PerCategoryCallback, (void*)typeCS.GetCString());
+            DataVisualization::Categories::LoopThrough(PerCategoryCallback, &typeCS);
             result.SetStatus(eReturnStatusSuccessFinishNoResult);
             return result.Succeeded();
         }





More information about the lldb-commits mailing list