layersurface: null check for surface validity before unmap()

This commit is contained in:
Vaxry 2024-07-28 23:41:36 +02:00
parent 73d09953e8
commit 256db08aed
1 changed files with 4 additions and 2 deletions

View File

@ -192,7 +192,8 @@ void CLayerSurface::onUnmap() {
g_pCompositor->addToFadingOutSafe(self.lock());
mapped = false;
layerSurface->surface->unmap();
if (layerSurface && layerSurface->surface)
layerSurface->surface->unmap();
startAnimation(false);
return;
@ -204,7 +205,8 @@ void CLayerSurface::onUnmap() {
startAnimation(false);
mapped = false;
layerSurface->surface->unmap();
if (layerSurface && layerSurface->surface)
layerSurface->surface->unmap();
g_pCompositor->addToFadingOutSafe(self.lock());