Revision: 13039
          http://sourceforge.net/p/skim-app/code/13039
Author:   hofman
Date:     2022-07-20 15:48:49 +0000 (Wed, 20 Jul 2022)
Log Message:
-----------
nothing toreload when no page popup

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

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2022-07-20 15:41:10 UTC (rev 13038)
+++ trunk/SKSecondaryPDFView.m  2022-07-20 15:48:49 UTC (rev 13039)
@@ -147,16 +147,18 @@
 #pragma mark Popup buttons
 
 - (void)reloadPagePopUpButton {
-    NSArray *labels = [[self document] pageLabels];
-    NSUInteger count = [pagePopUpButton numberOfItems];
-    
-    while (count--)
-        [pagePopUpButton removeItemAtIndex:count];
-    
-    if ([labels count] > 0) {
-        for (NSString *label in labels)
-            [pagePopUpButton addItemWithTitle:label];
-        [pagePopUpButton selectItemAtIndex:[[self currentPage] pageIndex]];
+    if (pagePopUpButton) {
+        NSArray *labels = [[self document] pageLabels];
+        NSUInteger count = [pagePopUpButton numberOfItems];
+        
+        while (count--)
+            [pagePopUpButton removeItemAtIndex:count];
+        
+        if ([labels count] > 0) {
+            for (NSString *label in labels)
+                [pagePopUpButton addItemWithTitle:label];
+            [pagePopUpButton selectItemAtIndex:[[self currentPage] pageIndex]];
+        }
     }
 }
 

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