diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/libgdl/gdl-switcher.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libgdl/gdl-switcher.c b/src/libgdl/gdl-switcher.c index fa52aa714..78ba1168d 100644 --- a/src/libgdl/gdl-switcher.c +++ b/src/libgdl/gdl-switcher.c @@ -301,6 +301,8 @@ layout_buttons (GdlSwitcher *switcher) /* Figure out how many rows and columns we'll use. */ btns_per_row = allocation.width / (max_btn_width + H_PADDING); + /* Use at least one column */ + if (btns_per_row == 0) btns_per_row = 1; /* If all the buttons could fit in the single row, have it so */ if (allocation.width >= optimal_layout_width) |
