aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-03-03 20:45:37 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-03-03 20:45:37 +0800
commit0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf (patch)
treed46eb02288a1cf765684322f8af05d2f9f05e3ab
parent8e33ff0fbb5908d06c9f32f58f35eca694b3f50c (diff)
downloadgsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.tar
gsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.tar.gz
gsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.tar.bz2
gsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.tar.lz
gsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.tar.xz
gsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.tar.zst
gsoc2013-evolution-0be641ea82d61a5967d4f34dde9bc3bbbb9aa7cf.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.
-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);