From 65890ea21d2f0f70ccca811f5d29c0085e2facaf Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Tue, 20 Sep 2022 10:05:01 +0200 Subject: [PATCH] Avoid referencing underfined symbol When building without ncurses out_to_ncurses is not defined. It is also not needed to check for ncurses if it is not compiled in. --- src/display-console.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/display-console.cc b/src/display-console.cc index eee111d1..822776bc 100644 --- a/src/display-console.cc +++ b/src/display-console.cc @@ -54,8 +54,11 @@ display_output_console::display_output_console(const std::string &name_) } bool display_output_console::detect() { - if ((out_to_stdout.get(*state) || out_to_stderr.get(*state)) && - !out_to_ncurses.get(*state)) { + if ((out_to_stdout.get(*state) || out_to_stderr.get(*state)) +#ifdef BUILD_NCURSES + && !out_to_ncurses.get(*state) +#endif + ) { DBGP2("Display output '%s' enabled in config.", name.c_str()); return true; }