desktop: fix segfault when destroying a partially create layer surface (#9247)

This commit is contained in:
Brayden Zee
2025-01-31 07:33:51 -05:00
committed by Vaxry
parent c8eec1916d
commit 047ea02820

View File

@@ -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());
}