mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
Fix stackoverflow on display handle clone call
This commit is contained in:
@@ -25,7 +25,8 @@ pub trait EguiDisplayHandle:
|
|||||||
|
|
||||||
impl Clone for Box<dyn EguiDisplayHandle> {
|
impl Clone for Box<dyn EguiDisplayHandle> {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
self.clone_display_handle()
|
// We need to deref here, otherwise this causes infinite recursion stack overflow.
|
||||||
|
(**self).clone_display_handle()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user