Revision: 28750 http://sourceforge.net/p/bibdesk/svn/28750 Author: hofman Date: 2024-02-16 18:16:59 +0000 (Fri, 16 Feb 2024) Log Message: ----------- Make sure webview is finisehd when webgroup's document is set to nil. dealloc is not guaranteed to be called.
Modified Paths: -------------- trunk/bibdesk/BDSKWebGroup.m Modified: trunk/bibdesk/BDSKWebGroup.m =================================================================== --- trunk/bibdesk/BDSKWebGroup.m 2024-02-16 17:58:48 UTC (rev 28749) +++ trunk/bibdesk/BDSKWebGroup.m 2024-02-16 18:16:59 UTC (rev 28750) @@ -136,8 +136,17 @@ - (void)setDocument:(BibDocument *)newDocument{ [super setDocument:newDocument]; - if (webView) + if (newDocument == nil) { + if (webView) { + [webView stopMonitoringURL]; + [webView setHostWindow:nil]; + [webView setDelegate:nil]; + } + if ([parsers count]) + [parsers makeObjectsPerformSelector:@selector(cancel)]; + } else if (webView) { [webView setHostWindow:[[[document windowControllers] firstObject] window]]; + } } - (void)refresh { 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