diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-09-01 20:02:03 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-09-01 20:03:58 +0200 |
| commit | 774a5bedf862e9956c1db42522f39a7b9327b32f (patch) | |
| tree | 9a01ebe6f1bd4609cefe3725ce376a482cf46ebb /src/protocols/WaylandProtocol.cpp | |
| parent | 8314341ffe5f6fd0d2e26f8b9bf65b703100e64a (diff) | |
waylandResource: remove user data in markDefunct and not ~dtor
Diffstat (limited to 'src/protocols/WaylandProtocol.cpp')
| -rw-r--r-- | src/protocols/WaylandProtocol.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/protocols/WaylandProtocol.cpp b/src/protocols/WaylandProtocol.cpp index 1ddf6f4b..6ff08227 100644 --- a/src/protocols/WaylandProtocol.cpp +++ b/src/protocols/WaylandProtocol.cpp @@ -31,6 +31,7 @@ void CWaylandResource::markDefunct() { Debug::log(TRACE, "[wl res %lx] now defunct", m_pWLResource); m_bDefunct = true; + wl_resource_set_user_data(m_pWLResource, nullptr); } CWaylandResource::~CWaylandResource() { @@ -39,9 +40,6 @@ CWaylandResource::~CWaylandResource() { wl_list_remove(&m_liResourceDestroy.link); wl_list_init(&m_liResourceDestroy.link); - if (m_pWLResource) - wl_resource_set_user_data(m_pWLResource, nullptr); - Debug::log(TRACE, "[wl res %lx] destroying (wl_resource_destroy will be %s)", m_pWLResource, (DESTROY ? "sent" : "not sent")); if (DESTROY) |
