fix: panic when overlay event processing removes overlay
This commit is contained in:
parent
92ba26b8a1
commit
41822d0dc5
1 changed files with 9 additions and 9 deletions
|
|
@ -263,16 +263,16 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let base_cursor = if manual_overlay
|
let base_cursor = manual_overlay
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap()
|
.filter(|overlay| {
|
||||||
.is_over(Layout::new(&layout), cursor_position)
|
overlay.is_over(Layout::new(&layout), cursor_position)
|
||||||
{
|
})
|
||||||
// TODO: Type-safe cursor availability
|
.map(|_| {
|
||||||
Point::new(-1.0, -1.0)
|
// TODO: Type-safe cursor availability
|
||||||
} else {
|
Point::new(-1.0, -1.0)
|
||||||
cursor_position
|
})
|
||||||
};
|
.unwrap_or(cursor_position);
|
||||||
|
|
||||||
self.overlay = Some(layout);
|
self.overlay = Some(layout);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue