Revision: 26760
          http://sourceforge.net/p/bibdesk/svn/26760
Author:   hofman
Date:     2021-08-29 09:28:54 +0000 (Sun, 29 Aug 2021)
Log Message:
-----------
Get retaoned data before releasing download

Modified Paths:
--------------
    trunk/bibdesk/BDSKWebView.m

Modified: trunk/bibdesk/BDSKWebView.m
===================================================================
--- trunk/bibdesk/BDSKWebView.m 2021-08-29 09:23:15 UTC (rev 26759)
+++ trunk/bibdesk/BDSKWebView.m 2021-08-29 09:28:54 UTC (rev 26760)
@@ -243,14 +243,16 @@
 - (void)downloader:(BDSKDownloader *)downloader download:(BDSKDownload 
*)download didCompleteWithError:(NSError *)error {
     if (faviconDownload != download)
         return;
-    [[download retain] autorelease];
+    NSData *data = [[download data] retain];
     BDSKDESTROY(faviconDownload);
-    if (error)
+    if (error) {
+        [data release];
         return;
-    NSData *data = [download data];
+    }
     if (data) {
         [favicon release];
         favicon = [[NSImage alloc] initWithData:data];
+        [data release];
         if (favicon && [[self frameLoadDelegate] 
respondsToSelector:@selector(webView:didReceiveIcon:forFrame:)])
             [[self frameLoadDelegate] webView:self didReceiveIcon:favicon 
forFrame:[self mainFrame]];
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to