Revision: 15448
          http://sourceforge.net/p/skim-app/code/15448
Author:   hofman
Date:     2025-06-12 14:28:31 +0000 (Thu, 12 Jun 2025)
Log Message:
-----------
don't bother wwith snapshots when there aren't any

Modified Paths:
--------------
    trunk/SKMainWindowController.m

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2025-06-12 14:24:12 UTC (rev 15447)
+++ trunk/SKMainWindowController.m      2025-06-12 14:28:31 UTC (rev 15448)
@@ -1111,11 +1111,13 @@
         placeholderPdfDocument = nil;
         
         // remember snapshots and close them, without animation
-        snapshotDicts = [snapshots valueForKey:SKSnapshotCurrentSetupKey];
-        [snapshots setValue:nil forKey:@"delegate"];
-        [snapshots makeObjectsPerformSelector:@selector(close)];
-        [self removeAllObjectsFromSnapshots];
-        [rightSideController.snapshotTableView reloadData];
+        if ([snapshots count]) {
+            snapshotDicts = [snapshots valueForKey:SKSnapshotCurrentSetupKey];
+            [snapshots setValue:nil forKey:@"delegate"];
+            [snapshots makeObjectsPerformSelector:@selector(close)];
+            [self removeAllObjectsFromSnapshots];
+            [rightSideController.snapshotTableView reloadData];
+        }
         
         [lastViewedPages setCount:0];
         

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to