wayland/layershell: ensure bridge is nulled on layer destruction

Fixes rare race condition crashes.
This commit is contained in:
outfoxxed 2025-05-25 16:11:57 -07:00
parent 2bcd9e07fd
commit bf235d3d4d
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
3 changed files with 34 additions and 3 deletions

View file

@ -173,7 +173,10 @@ LayerSurface::LayerSurface(LayerShellIntegration* shell, QtWaylandClient::QWayla
this->bridge->surface = this;
}
LayerSurface::~LayerSurface() { this->destroy(); }
LayerSurface::~LayerSurface() {
delete this->bridge;
this->destroy();
}
void LayerSurface::zwlr_layer_surface_v1_configure(quint32 serial, quint32 width, quint32 height) {
this->ack_configure(serial);