aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog8
-rw-r--r--calendar/gui/memos-component.c3
-rw-r--r--calendar/gui/tasks-component.c3
3 files changed, 12 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index f8fa6c3d5b..644088035d 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,11 @@
+2008-01-03 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for bug #506814
+
+ * gui/tasks-component.c: (create_new_todo):
+ * gui/tasks-component.c: (create_new_todo): Add the signal only if the
+ view is present.
+
2007-12-20 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #362638
diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c
index 801fe1cf40..3c57846972 100644
--- a/calendar/gui/memos-component.c
+++ b/calendar/gui/memos-component.c
@@ -1013,7 +1013,8 @@ create_new_memo (MemosComponent *memo_component, gboolean is_assigned, MemosComp
editor = memo_editor_new (ecal, flags);
comp = cal_comp_memo_new_with_defaults (ecal);
- g_signal_connect (editor, "object_created", G_CALLBACK (object_created_cb), e_memos_get_calendar_table (component_view->memos));
+ if (component_view->memos)
+ g_signal_connect (editor, "object_created", G_CALLBACK (object_created_cb), e_memos_get_calendar_table (component_view->memos));
comp_editor_edit_comp (COMP_EDITOR (editor), comp);
comp_editor_focus (COMP_EDITOR (editor));
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 4b998f3afa..e1b364c9fa 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -1000,7 +1000,8 @@ create_new_todo (TasksComponent *task_component, gboolean is_assigned, TasksComp
editor = task_editor_new (ecal, flags);
comp = cal_comp_task_new_with_defaults (ecal);
- g_signal_connect (editor, "object_created", G_CALLBACK (object_created_cb), e_tasks_get_calendar_table (component_view->tasks));
+ if (component_view)
+ g_signal_connect (editor, "object_created", G_CALLBACK (object_created_cb), e_tasks_get_calendar_table (component_view->tasks));
comp_editor_edit_comp (COMP_EDITOR (editor), comp);
if (is_assigned)