Fix intermittent failures when using --quiet
This commit is contained in:
1
NEWS
1
NEWS
@@ -1,5 +1,6 @@
|
|||||||
ncmpcpp-0.8.1 (????-??-??)
|
ncmpcpp-0.8.1 (????-??-??)
|
||||||
* Setting 'colors_enabled' to 'no' no longer results in a crash.
|
* 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)
|
ncmpcpp-0.8 (2017-05-21)
|
||||||
* Configuration variable 'execute_on_player_state_change' was added.
|
* Configuration variable 'execute_on_player_state_change' was added.
|
||||||
|
|||||||
@@ -105,11 +105,7 @@ bool configure(int argc, char **argv)
|
|||||||
|
|
||||||
// suppress messages from std::clog
|
// suppress messages from std::clog
|
||||||
if (vm.count("quiet"))
|
if (vm.count("quiet"))
|
||||||
{
|
std::clog.rdbuf(nullptr);
|
||||||
std::ofstream null_stream;
|
|
||||||
null_stream.open("/dev/null");
|
|
||||||
std::clog.rdbuf(null_stream.rdbuf());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vm.count("help"))
|
if (vm.count("help"))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user