[gthumb] check if the string is null before adding to the statusbar text



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]