diff --git a/wayland-backend/CHANGELOG.md b/wayland-backend/CHANGELOG.md index 99b336db265..08711335cdf 100644 --- a/wayland-backend/CHANGELOG.md +++ b/wayland-backend/CHANGELOG.md @@ -5,6 +5,9 @@ ### Additions - client: Implement `Eq` for `Backend` +#### Bugfixes +- backend/sys: Fix error/segfault if object argument is no longer alive + ## 0.3.2 -- 2023-09-25 #### Bugfixes diff --git a/wayland-backend/src/sys/client_impl/mod.rs b/wayland-backend/src/sys/client_impl/mod.rs index 946b5918201..6939314fe76 100644 --- a/wayland-backend/src/sys/client_impl/mod.rs +++ b/wayland-backend/src/sys/client_impl/mod.rs @@ -629,7 +629,7 @@ impl InnerBackend { Argument::Object(ref o) => { let next_interface = arg_interfaces.next().unwrap(); if !o.id.ptr.is_null() { - if !id.alive.as_ref().map(|a| a.load(Ordering::Acquire)).unwrap_or(true) { + if !o.id.alive.as_ref().map(|a| a.load(Ordering::Acquire)).unwrap_or(true) { unsafe { free_arrays(message_desc.signature, &argument_list) }; return Err(InvalidId); } diff --git a/wayland-backend/src/sys/server_impl/mod.rs b/wayland-backend/src/sys/server_impl/mod.rs index e2b1b34d8b4..56033eddf6b 100644 --- a/wayland-backend/src/sys/server_impl/mod.rs +++ b/wayland-backend/src/sys/server_impl/mod.rs @@ -1089,7 +1089,7 @@ impl ErasedState for State { Argument::Object(ref o) => { let next_interface = arg_interfaces.next().unwrap(); if !o.id.ptr.is_null() { - if !id.alive.load(Ordering::Acquire) { + if !o.id.alive.load(Ordering::Acquire) { unsafe { free_arrays(message_desc.signature, &argument_list) }; return Err(InvalidId); }