aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-switcher.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell-switcher.c')
-rw-r--r--shell/e-shell-switcher.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/e-shell-switcher.c b/shell/e-shell-switcher.c
index ec4f23ce53..226279e0b5 100644
--- a/shell/e-shell-switcher.c
+++ b/shell/e-shell-switcher.c
@@ -91,7 +91,7 @@ shell_switcher_layout_actions (EShellSwitcher *switcher)
/* If using text buttons, we want to try to have a
* completely filled-in grid, but if we can't, we want
* the odd row to have just a single button. */
- while (num_btns % btns_per_row > 1)
+ while (btns_per_row > 0 && num_btns % btns_per_row > 1)
btns_per_row--;
}