Revision: 28685
http://sourceforge.net/p/bibdesk/svn/28685
Author: hofman
Date: 2024-01-27 23:20:47 +0000 (Sat, 27 Jan 2024)
Log Message:
-----------
Don't cache empty pdf thumbnail when the pdf doc is not loaded, which would
happen after the pdf was immediately auto-filed by BibDesk
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m 2024-01-27
18:41:15 UTC (rev 28684)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVPDFIcon.m 2024-01-27
23:20:47 UTC (rev 28685)
@@ -447,7 +447,8 @@
_thumbnail = CGBitmapContextCreateImage(ctxt);
// okay to call cacheImage:forKey: even if the image is already cached
- if (1 == _currentPage && NULL != _thumbnail)
+ // unless _pdfDoc is NULL, which can happen when the file is moved,
e.g by BibDesk's auto-file
+ if (1 == _currentPage && NULL != _thumbnail && NULL != _pdfDoc)
thumbnail = CGImageRetain(_thumbnail);
}
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