diff options
Diffstat (limited to 'widgets/misc/e-attachment-bar.c')
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c index 5de718f914..15d8331e5b 100644 --- a/widgets/misc/e-attachment-bar.c +++ b/widgets/misc/e-attachment-bar.c @@ -415,6 +415,7 @@ update (EAttachmentBar *bar) calculate_height_width(bar, &width, &height); per_col = bar_width / width; + per_col = per_col ? per_col : 1; rows = (bar->priv->num_attachments + per_col -1 )/ per_col; gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, rows * height); } @@ -505,6 +506,7 @@ e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width) calculate_height_width(bar, &width, &height); per_col = bar_width / width; + per_col = per_col ? per_col : 1; rows = (bar->priv->num_attachments + per_col - 1) / per_col; gtk_widget_set_size_request ((GtkWidget *)bar, bar_width, rows * height); } |