diff --git a/src/WaylandServer/WaylandResource.h b/src/WaylandServer/WaylandResource.h index 05b41e5df2..0a5994a0c2 100644 --- a/src/WaylandServer/WaylandResource.h +++ b/src/WaylandServer/WaylandResource.h @@ -46,15 +46,6 @@ namespace gamescope::WaylandServer { } - void OnResourceDestroy() - { - m_pResource = nullptr; - m_pClient = nullptr; - m_uVersion = 0; - - delete this; - } - template static bool CheckAllocation( const T &object, wl_client *pClient ) { @@ -101,7 +92,7 @@ namespace gamescope::WaylandServer []( wl_resource *pResource ) { T *pObject = CWaylandResource::FromWlResource( pResource ); - pObject->OnResourceDestroy(); + delete pObject; }); return pThing;