diff options
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/gui/tasks-control.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index eac473091e..e722cab968 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,11 @@ 2004-08-05 JP Rosevear <jpr@novell.com> + * gui/tasks-control.c (tasks_control_sensitize_commands): kill + warning by checking if there is a default client first (can happen + when first starting up) + +2004-08-05 JP Rosevear <jpr@novell.com> + Fixes #62363 * gui/calendar-component.c (create_new_event): diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c index f596aa8a07..7159d94b3a 100644 --- a/calendar/gui/tasks-control.c +++ b/calendar/gui/tasks-control.c @@ -139,6 +139,7 @@ tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_s { BonoboUIComponent *uic; gboolean read_only = TRUE; + ECal *ecal; ECalModel *model; uic = bonobo_control_get_ui_component (control); @@ -148,7 +149,9 @@ tasks_control_sensitize_commands (BonoboControl *control, ETasks *tasks, int n_s return; model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks)); - e_cal_is_read_only (e_cal_model_get_default_client (model), &read_only, NULL); + ecal = e_cal_model_get_default_client (model); + if (ecal) + e_cal_is_read_only (ecal, &read_only, NULL); bonobo_ui_component_set_prop (uic, "/commands/TasksOpenTask", "sensitive", n_selected != 1 ? "0" : "1", |