[Lldb-commits] [lldb] r226016 - Add null pointer checks to some SBStream functions.
Zachary Turner
zturner at google.com
Wed Jan 14 10:34:35 PST 2015
Author: zturner
Date: Wed Jan 14 12:34:35 2015
New Revision: 226016
URL: http://llvm.org/viewvc/llvm-project?rev=226016&view=rev
Log:
Add null pointer checks to some SBStream functions.
Modified:
lldb/trunk/source/API/SBStream.cpp
Modified: lldb/trunk/source/API/SBStream.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBStream.cpp?rev=226016&r1=226015&r2=226016&view=diff
==============================================================================
--- lldb/trunk/source/API/SBStream.cpp (original)
+++ lldb/trunk/source/API/SBStream.cpp Wed Jan 14 12:34:35 2015
@@ -70,6 +70,9 @@ SBStream::Printf (const char *format, ..
void
SBStream::RedirectToFile (const char *path, bool append)
{
+ if (path == nullptr)
+ return;
+
std::string local_data;
if (m_opaque_ap.get())
{
@@ -104,6 +107,9 @@ SBStream::RedirectToFile (const char *pa
void
SBStream::RedirectToFileHandle (FILE *fh, bool transfer_fh_ownership)
{
+ if (fh == nullptr)
+ return;
+
std::string local_data;
if (m_opaque_ap.get())
{
More information about the lldb-commits
mailing list