diff --git a/src/wayland/wlr_layershell/surface.cpp b/src/wayland/wlr_layershell/surface.cpp index 3188c6b1..26d75587 100644 --- a/src/wayland/wlr_layershell/surface.cpp +++ b/src/wayland/wlr_layershell/surface.cpp @@ -174,7 +174,10 @@ LayerSurface::LayerSurface(LayerShellIntegration* shell, QtWaylandClient::QWayla } LayerSurface::~LayerSurface() { - delete this->bridge; + if (this->bridge && this->bridge->surface == this) { + this->bridge->surface = nullptr; + } + this->destroy(); }