wayland: fix deadlock in SurfaceData::cleanup (#166)
This commit is contained in:
parent
a60e1cd7fd
commit
e42ccc8aee
|
@ -74,11 +74,12 @@ where
|
|||
}
|
||||
// orphan all our children
|
||||
for child in &my_data.children {
|
||||
// don't do anything if this child is ourselves
|
||||
if child.as_ref().equals(surface.as_ref()) {
|
||||
let child_mutex = child.as_ref().user_data::<Mutex<SurfaceData<R>>>().unwrap();
|
||||
if std::ptr::eq(child_mutex, my_data_mutex) {
|
||||
// This child is ourselves, don't do anything.
|
||||
continue;
|
||||
}
|
||||
let child_mutex = child.as_ref().user_data::<Mutex<SurfaceData<R>>>().unwrap();
|
||||
|
||||
let mut child_guard = child_mutex.lock().unwrap();
|
||||
child_guard.parent = None;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue