diff options
Diffstat (limited to 'source/API/SBStream.cpp')
-rw-r--r-- | source/API/SBStream.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/API/SBStream.cpp b/source/API/SBStream.cpp index f5b5c08411c77..f50334f741899 100644 --- a/source/API/SBStream.cpp +++ b/source/API/SBStream.cpp @@ -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 *path, bool append) void SBStream::RedirectToFileHandle (FILE *fh, bool transfer_fh_ownership) { + if (fh == nullptr) + return; + std::string local_data; if (m_opaque_ap.get()) { |