From ac5668192ed56c50b5612c7670e397a2128eeba6 Mon Sep 17 00:00:00 2001 From: Brayden Zee Date: Fri, 31 Jan 2025 07:33:51 -0500 Subject: [PATCH] desktop: fix segfault when destroying a partially create layer surface (#9247) --- src/desktop/LayerSurface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/desktop/LayerSurface.cpp b/src/desktop/LayerSurface.cpp index e2d0177b..78dae0a9 100644 --- a/src/desktop/LayerSurface.cpp +++ b/src/desktop/LayerSurface.cpp @@ -98,7 +98,8 @@ void CLayerSurface::onDestroy() { onUnmap(); } else { Debug::log(LOG, "Removing LayerSurface that wasn't mapped."); - alpha->setValueAndWarp(0.f); + if (alpha) + alpha->setValueAndWarp(0.f); fadingOut = true; g_pCompositor->addToFadingOutSafe(self.lock()); }