From eb7313805b06a9751e382fb70751290f49e334c1 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 27 Nov 2006 10:45:49 +0000 Subject: [PATCH] Protect against null streams. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31937 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Streams.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/Support/Streams.h b/include/llvm/Support/Streams.h index 138a0701497..8048d56e706 100644 --- a/include/llvm/Support/Streams.h +++ b/include/llvm/Support/Streams.h @@ -32,7 +32,7 @@ namespace llvm { std::ostream* stream() const { return Stream; } inline llvm_ostream &operator << (std::ostream& (*Func)(std::ostream&)) { - *Stream << Func; + if (Stream) *Stream << Func; return *this; } -- 2.34.1