aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-03 20:45:37 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:41 +0800
commitc1b409dd42acae66ad166b68e3a7c987a1a6ce46 (patch)
treed3478fae2d54c26a68bd194a8c87995974a2ea43 /modules/calendar
parentf3c11101c3c58a154c005a936a6b99671401986d (diff)
downloadgsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.tar
gsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.tar.gz
gsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.tar.bz2
gsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.tar.lz
gsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.tar.xz
gsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.tar.zst
gsoc2013-evolution-c1b409dd42acae66ad166b68e3a7c987a1a6ce46.zip
Bug 637091 - Crash in g_str_hash, task_shell_sidebar_client_removed
I don't know how in the world an ESource can wind up not having a UID string, but we saw a case of this in 2.32. Emit a runtime warning and avoid crashing.
Diffstat (limited to 'modules/calendar')
-rw-r--r--modules/calendar/e-cal-shell-sidebar.c1
-rw-r--r--modules/calendar/e-memo-shell-sidebar.c1
-rw-r--r--modules/calendar/e-task-shell-sidebar.c1
3 files changed, 3 insertions, 0 deletions
diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c
index be0a3443e2..21c630b549 100644
--- a/modules/calendar/e-cal-shell-sidebar.c
+++ b/modules/calendar/e-cal-shell-sidebar.c
@@ -746,6 +746,7 @@ cal_shell_sidebar_client_removed (ECalShellSidebar *cal_shell_sidebar,
source = e_cal_get_source (client);
uid = e_source_peek_uid (source);
+ g_return_if_fail (uid != NULL);
g_hash_table_remove (client_table, uid);
e_source_selector_unselect_source (selector, source);
diff --git a/modules/calendar/e-memo-shell-sidebar.c b/modules/calendar/e-memo-shell-sidebar.c
index 612b83126b..4c9e2544ba 100644
--- a/modules/calendar/e-memo-shell-sidebar.c
+++ b/modules/calendar/e-memo-shell-sidebar.c
@@ -651,6 +651,7 @@ memo_shell_sidebar_client_removed (EMemoShellSidebar *memo_shell_sidebar,
source = e_cal_get_source (client);
uid = e_source_peek_uid (source);
+ g_return_if_fail (uid != NULL);
g_hash_table_remove (client_table, uid);
e_source_selector_unselect_source (selector, source);
diff --git a/modules/calendar/e-task-shell-sidebar.c b/modules/calendar/e-task-shell-sidebar.c
index c6f6e1526d..99df3b6ab5 100644
--- a/modules/calendar/e-task-shell-sidebar.c
+++ b/modules/calendar/e-task-shell-sidebar.c
@@ -651,6 +651,7 @@ task_shell_sidebar_client_removed (ETaskShellSidebar *task_shell_sidebar,
source = e_cal_get_source (client);
uid = e_source_peek_uid (source);
+ g_return_if_fail (uid != NULL);
g_hash_table_remove (client_table, uid);
e_source_selector_unselect_source (selector, source);