From 43fa78cac4e6b82ed6b22ee4970627a40b3095ad Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 2 Feb 2009 19:36:29 -0500 Subject: [PATCH] Don't release the NSURLConnection object when an error has occured, it's already released upstream. --- iPhoto2Ansel/TURXMLConnection.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iPhoto2Ansel/TURXMLConnection.m b/iPhoto2Ansel/TURXMLConnection.m index 5de6227a2..58a73db6d 100644 --- a/iPhoto2Ansel/TURXMLConnection.m +++ b/iPhoto2Ansel/TURXMLConnection.m @@ -79,12 +79,15 @@ didReceiveResponse: (XMLRPCResponse *)theResponse userInfo: userInfo]; hasError = YES; [theResponse release]; - [xconnection cancel]; } response = [[theResponse responseObject] retain]; [theResponse release]; - [xconnection release]; + if (!hasError) { + // Looks like the NSURLConnection object is released somewhere upstream + // when there is an error. + [xconnection release]; + } running = NO; } -- 2.11.0