From: Jean Flach Date: Thu, 19 Feb 2015 16:44:42 +0000 (+0100) Subject: Fix the build error for real X-Git-Tag: v2.3.0~176 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c75ecd8c45d04a1dd54f3687a5550de1c6a5b735;p=icinga2 Fix the build error for real --- diff --git a/lib/cli/troubleshootcollectcommand.cpp b/lib/cli/troubleshootcollectcommand.cpp index f243424f1..6ffc76e38 100644 --- a/lib/cli/troubleshootcollectcommand.cpp +++ b/lib/cli/troubleshootcollectcommand.cpp @@ -357,10 +357,9 @@ void TroubleshootCollectCommand::CheckObjectFile(const String& objectfile, InfoL bool first = true; - if (print) - ObjectListUtility::PrintObject(std::ostream(NULL), first, message, type_count, "", ""); - else - ObjectListUtility::PrintObject(std::ostream(NULL), first, message, type_count, "", ""); + std::ofstream badstream; + + ObjectListUtility::PrintObject(badstream, first, message, type_count, "", ""); Dictionary::Ptr object = JsonDecode(message); Dictionary::Ptr properties = object->Get("properties");