diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-26 20:35:08 +0400 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2023-09-26 20:35:08 +0400 |
| commit | b7be8fcb75d8b03d7cc55df24d5f2730c9a17b3f (patch) | |
| tree | 4a1877194887328433a363ddc4db01349315f547 /src | |
| parent | 953d1064c280cacf5c4c6bf7bcf79eece4e4235a (diff) | |
| download | niri-b7be8fcb75d8b03d7cc55df24d5f2730c9a17b3f.tar.gz niri-b7be8fcb75d8b03d7cc55df24d5f2730c9a17b3f.tar.bz2 niri-b7be8fcb75d8b03d7cc55df24d5f2730c9a17b3f.zip | |
Fix verify_invariants() asserts
Diffstat (limited to 'src')
| -rw-r--r-- | src/layout.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/layout.rs b/src/layout.rs index 47a7a4b9..cd8ea9b0 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -886,14 +886,15 @@ impl<W: LayoutElement> MonitorSet<W> { } }; - assert!(primary_idx <= monitors.len()); - assert!(active_monitor_idx <= monitors.len()); + assert!(primary_idx < monitors.len()); + assert!(active_monitor_idx < monitors.len()); for (idx, monitor) in monitors.iter().enumerate() { assert!( !monitor.workspaces.is_empty(), "monitor monitor must have at least one workspace" ); + assert!(monitor.active_workspace_idx < monitor.workspaces.len()); let monitor_id = OutputId::new(&monitor.output); |
