aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-component-preview.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-cal-component-preview.c')
-rw-r--r--calendar/gui/e-cal-component-preview.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index 3a8e9c7bee..b833ef06ad 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -273,11 +273,12 @@ write_html (GtkHTMLStream *stream, ECal *ecal, ECalComponent *comp, icaltimezone
gtk_html_stream_printf (stream, "<TD>");
for (node = l; node != NULL; node = node->next) {
- gint i;
+ gint i, len;
GString *string = g_string_new (NULL);;
text = * (ECalComponentText *) node->data;
- for (i = 0; i < strlen (text.value ? text.value : 0); i++) {
+ len = text.value ? strlen (text.value) : 0;
+ for (i = 0; i <len ; i++) {
if (text.value[i] == '\n')
string = g_string_append_len (string, "<BR>", 4);
else if (text.value[i] == '<')