Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1311.2.12
diff -u -r1.1311.2.12 ChangeLog
--- ChangeLog	2002/01/23 19:09:54	1.1311.2.12
+++ ChangeLog	2002/02/06 00:16:24
@@ -1,3 +1,8 @@
+2002-02-06  Not Zed  <NotZed@Ximian.com>
+
+	* camel-service.c (camel_service_connect): Always set the
+	connect_op to NULL when we're done with it.  Fix for #19564.
+
 2002-01-11  Jeffrey Stedfast  <fejj@ximian.com>
 
 	* providers/imap/camel-imap-folder.c (imap_update_summary): Kludge
Index: camel-service.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/camel-service.c,v
retrieving revision 1.70.8.2
diff -u -r1.70.8.2 camel-service.c
--- camel-service.c	2002/01/23 19:09:55	1.70.8.2
+++ camel-service.c	2002/02/06 00:16:25
@@ -260,12 +260,12 @@
 	service->status = ret ? CAMEL_SERVICE_CONNECTED : CAMEL_SERVICE_DISCONNECTED;
 
 	CAMEL_SERVICE_LOCK (service, connect_op_lock);
-	if (unreg) {
-		camel_operation_unregister (service->connect_op);
+	/* its impossible this is null from this code, but we check anyway */
+	if (service->connect_op) {
+		if (unreg)
+			camel_operation_unregister (service->connect_op);
 		camel_operation_unref (service->connect_op);
 		service->connect_op = NULL;
-	} else {
-		camel_operation_unref (service->connect_op);
 	}
 	CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
 
