[gthumb] check if the string is null before adding to the statusbar text
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] check if the string is null before adding to the statusbar text
- Date: Mon, 4 Apr 2011 16:21:26 +0000 (UTC)
commit aba708fd5f551b19c1440a3a295479acd345d212
Author: Paolo Bacchilega <paobac src gnome org>
Date: Mon Apr 4 15:58:30 2011 +0200
check if the string is null before adding to the statusbar text
gthumb/gth-browser.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gthumb/gth-browser.c b/gthumb/gth-browser.c
index fd328c9..d75ff26 100644
--- a/gthumb/gth-browser.c
+++ b/gthumb/gth-browser.c
@@ -3176,11 +3176,16 @@ gth_browser_update_statusbar_file_info (GthBrowser *browser)
g_string_append (status, _("Modified"));
}
else {
- if (status->len > 0)
- g_string_append (status, STATUSBAR_SEPARATOR);
- g_string_append (status, file_size);
- g_string_append (status, STATUSBAR_SEPARATOR);
- g_string_append (status, file_date);
+ if (file_size != NULL) {
+ if (status->len > 0)
+ g_string_append (status, STATUSBAR_SEPARATOR);
+ g_string_append (status, file_size);
+ }
+ if (file_date != NULL) {
+ if (status->len > 0)
+ g_string_append (status, STATUSBAR_SEPARATOR);
+ g_string_append (status, file_date);
+ }
}
gth_statusbar_set_primary_text (GTH_STATUSBAR (browser->priv->statusbar), status->str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]