From 420a4ccb20825d618b06c6be742c2c47cc15ca71 Mon Sep 17 00:00:00 2001 From: Jonathon Jongsma Date: Mon, 30 Nov 2009 12:24:18 -0600 Subject: Fix a bug in e_alert_newv() that was causing a crash https://bugzilla.gnome.org/show_bug.cgi?id=602963 --- e-util/e-alert.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'e-util/e-alert.c') diff --git a/e-util/e-alert.c b/e-util/e-alert.c index cc7488744e..26af317ba4 100644 --- a/e-util/e-alert.c +++ b/e-util/e-alert.c @@ -424,18 +424,17 @@ EAlert * e_alert_newv(const gchar *tag, const gchar *arg0, va_list ap) { gchar *tmp; - GPtrArray *args; - EAlert *err = g_slice_new0 (EAlert); - err->tag = g_strdup (tag); - err->args = g_ptr_array_new_with_free_func (g_free); + EAlert *alert = g_slice_new0 (EAlert); + alert->tag = g_strdup (tag); + alert->args = g_ptr_array_new_with_free_func (g_free); tmp = (gchar *)arg0; while (tmp) { - g_ptr_array_add(args, g_strdup (tmp)); + g_ptr_array_add(alert->args, g_strdup (tmp)); tmp = va_arg(ap, gchar *); } - return err; + return alert; } /** -- cgit v1.2.3