From: <ho...@us...> - 2014-10-23 20:24:45
|
Revision: 8397 http://sourceforge.net/p/skim-app/code/8397 Author: hofman Date: 2014-10-23 20:24:37 +0000 (Thu, 23 Oct 2014) Log Message: ----------- make sure outline page range to check is non empty Modified Paths: -------------- trunk/SKMainWindowController_UI.m Modified: trunk/SKMainWindowController_UI.m =================================================================== --- trunk/SKMainWindowController_UI.m 2014-10-23 11:52:05 UTC (rev 8396) +++ trunk/SKMainWindowController_UI.m 2014-10-23 20:24:37 UTC (rev 8397) @@ -876,7 +876,7 @@ NSInteger numRows = [ov numberOfRows]; NSUInteger firstPage = [[[ov itemAtRow:row] page] pageIndex]; NSUInteger lastPage = row + 1 < numRows ? [[[ov itemAtRow:row + 1] page] pageIndex] : [[self pdfDocument] pageCount]; - NSRange range = NSMakeRange(firstPage, lastPage - firstPage); + NSRange range = NSMakeRange(firstPage, MAX(1LU, lastPage - firstPage)); NSUInteger i, iMax = [lastViewedPages count]; for (i = 0; i < iMax; i++) { if (NSLocationInRange((NSUInteger)[lastViewedPages pointerAtIndex:i], range)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |