aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-operation.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-operation.c')
-rw-r--r--camel/camel-operation.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index 42aa448820..95d8fa0f91 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -105,10 +105,13 @@ CamelOperation *camel_operation_registered(void)
CamelOperation *cc = NULL;
CAMEL_ACTIVE_LOCK();
- if (operation_active != NULL)
+ if (operation_active != NULL) {
cc = g_hash_table_lookup(operation_active, (void *)pthread_self());
- g_assert(cc->refcount > 0);
- cc->refcount++;
+ if (cc) {
+ g_assert(cc->refcount > 0);
+ cc->refcount++;
+ }
+ }
CAMEL_ACTIVE_UNLOCK();
return cc;