From f50b6762c2e63a2e04633207ac0a0160197cb483 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Tue, 1 Sep 2009 00:15:56 -0400 Subject: [PATCH] release _currentGallery when disconnecting --- ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m b/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m index e255af13e..3dc34c20e 100644 --- a/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m +++ b/ApertureToAnselExportPlugin/ApertureToAnselExportPlugin.m @@ -208,7 +208,7 @@ NSString * const TURAnselServerPasswordKey = @"password"; - (void)exportManagerShouldBeginExport { // You must call [_exportManager shouldBeginExport] here or elsewhere before Aperture will begin the export process - NSLog(@"exportManagerShouldBeginExport"); + NSLog(@"exportManagerShouldBeginExport: %@", _currentGallery); if (_currentGallery == nil) { NSLog(@"No gallery selected."); NSBeginAlertSheet(@"Export failed", nil, nil, nil, @@ -663,7 +663,7 @@ NSString * const TURAnselServerPasswordKey = @"password"; // Make sure we clean up from any previous connection -(void)disconnect { - [galleryCombo deselectItemAtIndex: [galleryCombo indexOfSelectedItem]]; + //[galleryCombo deselectItemAtIndex: [galleryCombo indexOfSelectedItem]]; [galleryCombo setDelegate: nil]; [galleryCombo setDataSource: nil]; [galleryCombo reloadData]; @@ -673,6 +673,10 @@ NSString * const TURAnselServerPasswordKey = @"password"; [defaultImageView setImage: nil]; [_currentServer release]; _currentServer = nil; + [_currentGallery setDelegate: nil]; + [_currentGallery release]; + _currentGallery = nil; + [_anselController setDelegate: nil]; [_anselController release]; _anselController = nil; [self setStatusText:@"Not logged in" withColor: [NSColor redColor]]; -- 2.11.0