From cb6e36d8046aaaede76be4eff2e51e3d35ba3b30 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 23 Jan 2023 18:23:44 +0000 Subject: [PATCH] ignore null ls-es in cleanup --- src/helpers/Monitor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 7d44b0c0..bf97a80c 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -194,7 +194,8 @@ void CMonitor::onDisconnect() { for (size_t i = 0; i < 4; ++i) { for (auto& ls : m_aLayerSurfaceLayers[i]) { - wlr_layer_surface_v1_destroy(ls->layerSurface); + if (ls->layerSurface && !ls->fadingOut) + wlr_layer_surface_v1_destroy(ls->layerSurface); } m_aLayerSurfaceLayers[i].clear(); }