From 80e063ef8079681151b6113def141d5f3bc8e17f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 4 Sep 2022 14:11:41 +0200 Subject: [PATCH] Fix crash when no display output is enabled --- src/display-output.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/display-output.hh b/src/display-output.hh index 240c4d80..77de1875 100644 --- a/src/display-output.hh +++ b/src/display-output.hh @@ -172,8 +172,9 @@ static inline conky::display_output_base *display_output() { if (conky::current_display_outputs.size()) return conky::current_display_outputs[0]; // XXX; not really what intended yet... - return conky::active_display_outputs[0]; - // return nullptr; + if (conky::active_display_outputs.size()) + return conky::active_display_outputs[0]; + return nullptr; } static inline void unset_display_output() {