summaryrefslogtreecommitdiff
path: root/camel/camel-operation.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-operation.c')
-rw-r--r--camel/camel-operation.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/camel/camel-operation.c b/camel/camel-operation.c
index 926dbd41c..88ee3e52c 100644
--- a/camel/camel-operation.c
+++ b/camel/camel-operation.c
@@ -90,6 +90,10 @@ operation_emit_status_cb (StatusNode *node)
gchar *message = NULL;
gint percent = 0;
+ /* Guard against reference counting errors. */
+ g_return_val_if_fail (node != NULL, FALSE);
+ g_return_val_if_fail (CAMEL_IS_OPERATION (node->operation), FALSE);
+
/* Keep the operation alive until we emit the signal,
* otherwise it might be finalized between unlocking
* the mutex and emitting the signal. */