diff --git a/crates/opensi-editor/src/app/round_tab.rs b/crates/opensi-editor/src/app/round_tab.rs index 1d656da..ddc7353 100644 --- a/crates/opensi-editor/src/app/round_tab.rs +++ b/crates/opensi-editor/src/app/round_tab.rs @@ -66,9 +66,13 @@ fn round_themes( let Some(round) = package.get_round(idx) else { return; }; - let max_theme_len = - round.themes.iter().map(|theme| theme.questions.len()).max().unwrap_or_default(); - (max_theme_len + 2, round.themes.len() + 1) + if round.themes.is_empty() { + (1, 1) + } else { + let max_theme_len = + round.themes.iter().map(|theme| theme.questions.len()).max().unwrap_or_default(); + (max_theme_len + 2, round.themes.len() + 1) + } }; CardTable::new("round-themes").show(ui, count, |mut row| {