wlserver: Fix use after free on shutdown using content overrides
This commit is contained in:
parent
119b8eda83
commit
a2ec78665b
1 changed files with 8 additions and 0 deletions
|
@ -1251,6 +1251,14 @@ gamescope_xwayland_server_t::gamescope_xwayland_server_t(wl_display *display)
|
|||
|
||||
gamescope_xwayland_server_t::~gamescope_xwayland_server_t()
|
||||
{
|
||||
/* Clear content overrides */
|
||||
for (auto& co : content_overrides)
|
||||
{
|
||||
wl_list_remove( &co.second->surface_destroy_listener.link );
|
||||
free( co.second );
|
||||
}
|
||||
content_overrides.clear();
|
||||
|
||||
wlr_xwayland_server_destroy(xwayland_server);
|
||||
xwayland_server = nullptr;
|
||||
|
||||
|
|
Loading…
Reference in a new issue