From: <ama...@us...> - 2007-09-28 23:37:52
|
Revision: 2992 http://skim-app.svn.sourceforge.net/skim-app/?rev=2992&view=rev Author: amaxwell Date: 2007-09-28 16:37:40 -0700 (Fri, 28 Sep 2007) Log Message: ----------- fix out of bounds exception Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2007-09-26 15:38:51 UTC (rev 2991) +++ trunk/SKMainWindowController.m 2007-09-28 23:37:40 UTC (rev 2992) @@ -412,7 +412,7 @@ // Go to page? if ([sud boolForKey:SKRememberLastPageViewedKey]) { unsigned int pageIndex = [[SKBookmarkController sharedBookmarkController] pageIndexForRecentDocumentAtPath:[[[self document] fileURL] path]]; - if (pageIndex != NSNotFound) + if (pageIndex != NSNotFound && [[pdfView document] pageCount] > pageIndex) [pdfView goToPage:[[pdfView document] pageAtIndex:pageIndex]]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |