From db28618929b9ec11e831d5a44437757f6195497d Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Thu, 31 Aug 2017 09:23:11 +0200 Subject: [PATCH] Fix intermittent failures when using --quiet --- NEWS | 1 + src/configuration.cpp | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 401ba8ba..e1a67556 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ ncmpcpp-0.8.1 (????-??-??) * Setting 'colors_enabled' to 'no' no longer results in a crash. +* Using '--quiet' command line argument no longer results in a crash. ncmpcpp-0.8 (2017-05-21) * Configuration variable 'execute_on_player_state_change' was added. diff --git a/src/configuration.cpp b/src/configuration.cpp index 5673c218..005b27ee 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -105,11 +105,7 @@ bool configure(int argc, char **argv) // suppress messages from std::clog if (vm.count("quiet")) - { - std::ofstream null_stream; - null_stream.open("/dev/null"); - std::clog.rdbuf(null_stream.rdbuf()); - } + std::clog.rdbuf(nullptr); if (vm.count("help")) {