wayland: Fix a crash in DrmLeaseDeviceV1Interface::setDrmMaster()
The case when a resource is destroyed before kwin becomes the drm master again is not handled. It can leave dangling pointers in m_pendingFds.
This commit is contained in:
parent
3b28788592
commit
9e77e5038f
2 changed files with 6 additions and 0 deletions
|
@ -241,6 +241,11 @@ void DrmLeaseDeviceV1Interface::wp_drm_lease_device_v1_bind_resource(Resource *r
|
|||
send_done(resource->handle);
|
||||
}
|
||||
|
||||
void DrmLeaseDeviceV1Interface::wp_drm_lease_device_v1_destroy_resource(Resource *resource)
|
||||
{
|
||||
m_pendingFds.removeOne(resource->handle);
|
||||
}
|
||||
|
||||
void DrmLeaseDeviceV1Interface::wp_drm_lease_device_v1_destroy_global()
|
||||
{
|
||||
delete this;
|
||||
|
|
|
@ -49,6 +49,7 @@ private:
|
|||
void wp_drm_lease_device_v1_create_lease_request(Resource *resource, uint32_t id) override;
|
||||
void wp_drm_lease_device_v1_release(Resource *resource) override;
|
||||
void wp_drm_lease_device_v1_bind_resource(Resource *resource) override;
|
||||
void wp_drm_lease_device_v1_destroy_resource(Resource *resource) override;
|
||||
void wp_drm_lease_device_v1_destroy_global() override;
|
||||
|
||||
DrmGpu *const m_gpu;
|
||||
|
|
Loading…
Reference in a new issue