[gnome-packagekit/gnome-2-28] dont segfault if error_local is not set
- From: Scott Reeves <sreeves src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-packagekit/gnome-2-28] dont segfault if error_local is not set
- Date: Thu, 8 Oct 2009 17:54:52 +0000 (UTC)
commit 9d5e3178e0ffee286f17e2e1b56e77d72c30549b
Author: Scott Reeves <sreeves novell com>
Date: Thu Oct 8 11:49:03 2009 -0600
dont segfault if error_local is not set
src/gpk-dbus-task.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gpk-dbus-task.c b/src/gpk-dbus-task.c
index 7f86fa5..48fcfb2 100644
--- a/src/gpk-dbus-task.c
+++ b/src/gpk-dbus-task.c
@@ -484,7 +484,8 @@ gpk_dbus_task_install_package_ids (GpkDbusTask *task)
if (!ret) {
/* TRANSLATORS: error: failed to install, detailed error follows */
gpk_dbus_task_error_msg (task, _("Failed to install package"), error_local);
- error = g_error_new (GPK_DBUS_ERROR, GPK_DBUS_ERROR_INTERNAL_ERROR, "%s", error_local->message);
+ error = g_error_new (GPK_DBUS_ERROR, GPK_DBUS_ERROR_INTERNAL_ERROR, "%s",
+ error_local ? error_local->message : NULL);
dbus_g_method_return_error (task->priv->context, error);
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]