dnd: Don't call Arc::get_mut
The caller of `start_dnd` may also have a reference, so this can panic. Either the public API shouldn't take an `Arc` or this should be avoided. There doesn't seem to be any reason this is needed anyway.
This commit is contained in:
parent
a83bf83784
commit
6b9faab87b
1 changed files with 1 additions and 7 deletions
|
|
@ -45,13 +45,7 @@ impl<T: mime::AsMimeTypes> AsMimeTypes for DataWrapper<T> {
|
||||||
|
|
||||||
impl smithay_clipboard::dnd::RawSurface for DndSurface {
|
impl smithay_clipboard::dnd::RawSurface for DndSurface {
|
||||||
unsafe fn get_ptr(&mut self) -> *mut c_void {
|
unsafe fn get_ptr(&mut self) -> *mut c_void {
|
||||||
// XXX won't panic because this is only called once before it could be
|
self.0.window_handle().unwrap().get_ptr()
|
||||||
// cloned
|
|
||||||
Arc::get_mut(&mut self.0)
|
|
||||||
.unwrap()
|
|
||||||
.window_handle()
|
|
||||||
.unwrap()
|
|
||||||
.get_ptr()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue