wayland: fix UAF in layershell surface destructor

This commit is contained in:
outfoxxed 2024-05-31 00:24:58 -07:00
parent 7feae55ebe
commit 6c9526761c
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
3 changed files with 18 additions and 2 deletions

View file

@ -13,6 +13,12 @@
#include "shell_integration.hpp"
#include "surface.hpp"
LayershellWindowExtension::~LayershellWindowExtension() {
if (this->surface != nullptr) {
this->surface->ext = nullptr;
}
}
LayershellWindowExtension* LayershellWindowExtension::get(QWindow* window) {
auto v = window->property("layershell_ext");