aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/ChangeLog3
-rw-r--r--calendar/gui/e-tasks.c15
2 files changed, 12 insertions, 6 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f447654950..9a9e8a5502 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,8 @@
2004-06-03 Rodrigo Moya <rodrigo@novell.com>
+ * gui/e-tasks.c (set_status_message): don't use vsprintf with
+ NULL strings, crashes on FreeBSD.
+
* gui/dialogs/comp-editor-page.c
(comp_editor_page_notify_client_changed): update the internal client
when it changes.
diff --git a/calendar/gui/e-tasks.c b/calendar/gui/e-tasks.c
index 947cf60a11..56d9709d12 100644
--- a/calendar/gui/e-tasks.c
+++ b/calendar/gui/e-tasks.c
@@ -679,15 +679,18 @@ set_status_message (ETasks *tasks, const char *message, ...)
{
ETasksPrivate *priv;
va_list args;
- char sz[2048];
-
- va_start (args, message);
- vsnprintf (sz, sizeof sz, message, args);
- va_end (args);
+ char sz[2048], *msg_string = NULL;
+
+ if (message) {
+ va_start (args, message);
+ vsnprintf (sz, sizeof sz, message, args);
+ va_end (args);
+ msg_string = sz;
+ }
priv = tasks->priv;
- e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), sz);
+ e_calendar_table_set_status_message (E_CALENDAR_TABLE (priv->tasks_view), msg_string);
}
/* Callback from the calendar client when an error occurs in the backend */