Revision: 28794
http://sourceforge.net/p/bibdesk/svn/28794
Author: hofman
Date: 2024-02-21 22:33:38 +0000 (Wed, 21 Feb 2024)
Log Message:
-----------
avoid loading any PDF in the previewer after termination, loading a PDF during
app termination can crash
Modified Paths:
--------------
trunk/bibdesk/BDSKPreviewer.m
Modified: trunk/bibdesk/BDSKPreviewer.m
===================================================================
--- trunk/bibdesk/BDSKPreviewer.m 2024-02-21 18:13:11 UTC (rev 28793)
+++ trunk/bibdesk/BDSKPreviewer.m 2024-02-21 22:33:38 UTC (rev 28794)
@@ -134,6 +134,9 @@
selector:@selector(handleMainDocumentDidChangeNotification:)
name:BDSKDocumentControllerDidChangeMainDocumentNotification
object:nil];
+ } else {
+ // the window may still send windowWillClose: even if it is not shown,
why is that?
+ [[self window] setDelegate:nil];
}
// empty document to avoid problem when zoom is set to auto
@@ -248,6 +251,10 @@
if (state == previewState && state != BDSKPreviewStateShowing)
return;
+ // don't display anything when terminated, loading a PDF in a PDFView
while the app terminates can lead to a crash in the async page drawing thread
+ if (texTask == nil)
+ return;
+
previewState = state;
// start or stop the spinning wheel
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit