[jana] Fix JanaEcalTask's jana_task_get_priority implementation
- From: Rob Bradford <rbradford src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [jana] Fix JanaEcalTask's jana_task_get_priority implementation
- Date: Tue, 6 Oct 2009 17:24:34 +0000 (UTC)
commit d358737bf00017fbb0aae72414830904d92f36f7
Author: Rob Bradford <rob linux intel com>
Date: Tue Oct 6 17:45:36 2009 +0100
Fix JanaEcalTask's jana_task_get_priority implementation
libjana-ecal/jana-ecal-task.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libjana-ecal/jana-ecal-task.c b/libjana-ecal/jana-ecal-task.c
index 53bb240..2a4db7d 100644
--- a/libjana-ecal/jana-ecal-task.c
+++ b/libjana-ecal/jana-ecal-task.c
@@ -219,13 +219,14 @@ static gint
task_get_priority (JanaTask *self)
{
ECalComponent *comp;
- gint *priority;
+ gint *priority = NULL;
gint res;
g_object_get (self, "ecalcomp", &comp, NULL);
e_cal_component_get_priority (comp, &priority);
- res = *priority;
- e_cal_component_free_priority (priority);
+ res = priority ? *priority: 0;
+ if (priority)
+ e_cal_component_free_priority (priority);
g_object_unref (comp);
return res;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]