diff options
author | JP Rosevear <jpr@novell.com> | 2004-08-05 21:16:16 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-08-05 21:16:16 +0800 |
commit | 228f16385632b4f0ab790249d384414125706e36 (patch) | |
tree | 4d9f589d3b1cc80067a3f1c7055ad68b6bf5345d /calendar/gui | |
parent | b8589b570f918a284a2b864b721e2e98e3be82bf (diff) | |
download | gsoc2013-evolution-228f16385632b4f0ab790249d384414125706e36.tar.gz gsoc2013-evolution-228f16385632b4f0ab790249d384414125706e36.tar.zst gsoc2013-evolution-228f16385632b4f0ab790249d384414125706e36.zip |
kill warning by checking if there is a default client first (can happen
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)
svn path=/trunk/; revision=26827
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/tasks-control.c | 5 |
1 files changed, 4 insertions, 1 deletions
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", |