aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-attachment-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r--composer/e-msg-composer-attachment-bar.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 1bf315ad08..d81c5cc16d 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -98,7 +98,7 @@ size_to_string (gulong size)
I am not sure this will be OK for all the languages. */
if (size < 1e3L) {
- size_string = g_strdup ("");
+ size_string = NULL;
} else {
gdouble displayed_size;
@@ -372,8 +372,12 @@ update (EMsgComposerAttachmentBar *bar)
if (attachment->size) {
size_string = size_to_string (attachment->size);
- label = g_strdup_printf ("%s (%s)", desc, size_string);
- g_free (size_string);
+ if (size_string == NULL) {
+ label = g_strdup (desc);
+ } else {
+ label = g_strdup_printf ("%s (%s)", desc, size_string);
+ g_free (size_string);
+ }
} else
label = g_strdup (desc);