1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

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.
This commit is contained in:
Guido Falsi 2022-09-20 10:05:01 +02:00 committed by Brenden Matthews
parent 21dc2ca0b8
commit 65890ea21d

View File

@ -54,8 +54,11 @@ display_output_console::display_output_console(const std::string &name_)
} }
bool display_output_console::detect() { bool display_output_console::detect() {
if ((out_to_stdout.get(*state) || out_to_stderr.get(*state)) && if ((out_to_stdout.get(*state) || out_to_stderr.get(*state))
!out_to_ncurses.get(*state)) { #ifdef BUILD_NCURSES
&& !out_to_ncurses.get(*state)
#endif
) {
DBGP2("Display output '%s' enabled in config.", name.c_str()); DBGP2("Display output '%s' enabled in config.", name.c_str());
return true; return true;
} }