Revision: 15470
http://sourceforge.net/p/skim-app/code/15470
Author: hofman
Date: 2025-06-16 14:20:37 +0000 (Mon, 16 Jun 2025)
Log Message:
-----------
initialize arrays to nil when nothingn will be in it
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2025-06-16 09:20:22 UTC (rev 15469)
+++ trunk/SKMainWindowController.m 2025-06-16 14:20:37 UTC (rev 15470)
@@ -982,13 +982,16 @@
PDFDocument *pdfDoc = [pdfView document];
NSMutableIndexSet *pageIndexes = [NSMutableIndexSet indexSet];
- NSMutableArray *addedNotes = [NSMutableArray array];
- NSMutableArray *removedNotesAndPages = [NSMutableArray array];
- NSMutableIndexSet *removedIndexes = [[notesToRemove firstObject]
isSkimNote] ? [NSMutableIndexSet indexSet] : nil;
+ NSMutableArray *addedNotes = nil;
+ NSMutableArray *removedNotesAndPages = nil;
+ NSMutableIndexSet *removedIndexes = nil;
mwcFlags.addOrRemoveNotesInBulk = 1;
if ([notesToRemove count]) {
+ removedNotesAndPages = [NSMutableArray array];
+ if ([[notesToRemove firstObject] isSkimNote])
+ removedIndexes = [NSMutableIndexSet indexSet];
for (PDFAnnotation *annotation in notesToRemove) {
PDFPage *page = [annotation page];
[removedNotesAndPages addObject:@[annotation, page]];
@@ -1001,6 +1004,7 @@
if ([notesAndPagesToAdd count]) {
BOOL shouldDisplay = [pdfView hideNotes] == NO;
+ addedNotes = [NSMutableArray array];
for (NSArray *annotationAndPage in notesAndPagesToAdd) {
PDFAnnotation *annotation = [annotationAndPage firstObject];
PDFPage *page = [annotationAndPage lastObject];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit