From 985764c8db01ff8f23461ed860eaacf3d52ee813 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 12 Apr 2023 20:18:55 +0100 Subject: [PATCH] listeners: more safety around change --- src/events/Monitors.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index c9bb6dd7..fab7fc89 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -19,6 +19,9 @@ void Events::listener_change(wl_listener* listener, void* data) { // layout got changed, let's update monitors. const auto CONFIG = wlr_output_configuration_v1_create(); + if (!CONFIG) + return; + for (auto& m : g_pCompositor->m_vMonitors) { if (!m->output) continue;