From: <ho...@us...> - 2015-10-03 20:20:12
|
Revision: 8898 http://sourceforge.net/p/skim-app/code/8898 Author: hofman Date: 2015-10-03 20:20:10 +0000 (Sat, 03 Oct 2015) Log Message: ----------- Ignore empty find matches, which PDFKit apparently may return erroneously and crash us Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2015-10-03 19:49:32 UTC (rev 8897) +++ trunk/SKMainWindowController.m 2015-10-03 20:20:10 UTC (rev 8898) @@ -2046,6 +2046,10 @@ } PDFPage *page = [instance safeFirstPage]; + // this should never happen, but apparently PDFKit sometimes does return empty matches + if (page == nil) + return; + CGFloat order = [instance boundsOrderForPage:page]; NSInteger i = [searchResults count]; while (i-- > 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |