Merge pull request #1700 from nicksenger/overlay/fix-panic
Fix panic when overlay event processing removes overlay
This commit is contained in:
commit
efbf66b0a1
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()
|
||||
.unwrap()
|
||||
.is_over(Layout::new(&layout), cursor_position)
|
||||
{
|
||||
// TODO: Type-safe cursor availability
|
||||
Point::new(-1.0, -1.0)
|
||||
} else {
|
||||
cursor_position
|
||||
};
|
||||
.filter(|overlay| {
|
||||
overlay.is_over(Layout::new(&layout), cursor_position)
|
||||
})
|
||||
.map(|_| {
|
||||
// TODO: Type-safe cursor availability
|
||||
Point::new(-1.0, -1.0)
|
||||
})
|
||||
.unwrap_or(cursor_position);
|
||||
|
||||
self.overlay = Some(layout);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue