aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@src.gnome.org>2005-11-17 12:29:31 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2005-11-17 12:29:31 +0800
commitec7081a5db22f7c8766d824e4852910b714d1028 (patch)
tree5d752e5e824246677664376278853821f5a1bbae /widgets/misc
parent9884d03d842f2e4e7b0886b9f2a0586050de3fac (diff)
downloadgsoc2013-evolution-ec7081a5db22f7c8766d824e4852910b714d1028.tar.gz
gsoc2013-evolution-ec7081a5db22f7c8766d824e4852910b714d1028.tar.zst
gsoc2013-evolution-ec7081a5db22f7c8766d824e4852910b714d1028.zip
Fix a division-by-zero error crasher
svn path=/trunk/; revision=30630
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/ChangeLog5
-rw-r--r--widgets/misc/e-attachment-bar.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index d2e2b007c3..3e431df074 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-17 Harish Krishnaswamy <kharish@novell.com>
+
+ * e-attachment-bar.c: (update), (e_attachment_bar_set_width):
+ Fix a division-by-zero error crasher.
+
2005-11-15 Srinivasa Ragavan <sragavan@novell.com>
* e-attachment-bar.[ch] (e_attachment_bar_get_all_attachments): Added
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);
}