From 250560d1065a2556deb921b0ce1ba677de5821d5 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. llvm-svn: 31937 --- 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; }