From: Bill Wendling Date: Mon, 27 Nov 2006 10:45:49 +0000 (+0000) Subject: Protect against null streams. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=eb7313805b06a9751e382fb70751290f49e334c1;p=oota-llvm.git Protect against null streams. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31937 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; }