fix: remove foreign toplevel handle too
This commit is contained in:
parent
6026520bd3
commit
7d1daab7bc
1 changed files with 6 additions and 0 deletions
|
|
@ -418,6 +418,12 @@ where
|
|||
handle.closed();
|
||||
}
|
||||
}
|
||||
// Remove the foreign handle too, so new subscribers cannot
|
||||
// discover a toplevel whose window has already been destroyed.
|
||||
if let Some(handle) = state.foreign_handle.take() {
|
||||
self.foreign_toplevel_list.remove_toplevel(&handle);
|
||||
}
|
||||
*state = Default::default();
|
||||
dirty = true;
|
||||
false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue