diff options
Diffstat (limited to 'src/ui/state.rs')
-rw-r--r-- | src/ui/state.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/state.rs b/src/ui/state.rs index bbf2c56..a6dd89d 100644 --- a/src/ui/state.rs +++ b/src/ui/state.rs @@ -204,6 +204,9 @@ impl UIState { fn grid_destroy(&mut self, grid: &i64) { // TODO(ville): Make sure all grid resources are freed. self.grids.remove(grid).unwrap(); // Drop grid. + if self.windows.contains_key(grid) { + self.windows.remove(grid).unwrap(); // Drop window that the grid belongs to. + } // Make the current grid to point to the default grid. We relay on the fact // that current_grid is always pointing to a existing grid. |