Skip to content

Commit

Permalink
Fix panic when removing mapping while some mapping panel edit control…
Browse files Browse the repository at this point in the history
… has focus
  • Loading branch information
helgoboss committed Oct 27, 2024
1 parent 45a28cd commit 725d403
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main/src/infrastructure/ui/mapping_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7324,6 +7324,10 @@ impl View for MappingPanel {
if self.is_invoked_programmatically() {
return false;
}
if self.session().try_borrow_mut().is_err() {
// This happens e.g. when the edit control had focus while removing the mapping.
return false;
}
let view = self.clone();
self.handle_potential_min_max_edit_control_change(resource_id);
// This is also called when the window is hidden.
Expand Down

0 comments on commit 725d403

Please sign in to comment.