[evolution-data-server] CamelIMAPXServer: Avoid crashing in cancel_all_jobs().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelIMAPXServer: Avoid crashing in cancel_all_jobs().
- Date: Wed, 7 Mar 2012 18:25:01 +0000 (UTC)
commit 132b32693210b8173c591d9c8c80efc798f8bfbb
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Mar 7 13:23:50 2012 -0500
CamelIMAPXServer: Avoid crashing in cancel_all_jobs().
This is a workaround. I don't know why some CamelIMAPXCommands are bad.
camel/providers/imapx/camel-imapx-server.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index e0be69e..eb50101 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -5094,6 +5094,12 @@ cancel_all_jobs (CamelIMAPXServer *is,
for (link = head; link != NULL; link = g_list_next (link)) {
CamelIMAPXCommand *ic = link->data;
+ /* Sanity check the CamelIMAPXCommand before proceeding.
+ * XXX We are actually getting reports of crashes here...
+ * not sure how this is happening but it's happening. */
+ if (ic == NULL || ic->job == NULL)
+ continue;
+
if (ic->job->error == NULL)
ic->job->error = g_error_copy (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]