Revision: 13412
          http://sourceforge.net/p/skim-app/code/13412
Author:   hofman
Date:     2023-04-02 14:59:03 +0000 (Sun, 02 Apr 2023)
Log Message:
-----------
check whether bounds is not empty

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

Modified: trunk/PDFDestination_SKExtensions.m
===================================================================
--- trunk/PDFDestination_SKExtensions.m 2023-04-02 08:32:49 UTC (rev 13411)
+++ trunk/PDFDestination_SKExtensions.m 2023-04-02 14:59:03 UTC (rev 13412)
@@ -102,7 +102,7 @@
             if (point.y >= kPDFDestinationUnspecifiedValue)
                 point.y = NSMaxY(bounds);
             PDFDestination *destination = [[[PDFDestination alloc] 
initWithPage:page atPoint:point] autorelease];
-            if (size.width > 0.0 && size.height > 0.0)
+            if (size.width > 0.0 && size.height > 0.0 && NSWidth(bounds) > 0.0 
&& NSHeight(bounds) > 0.0)
                 [destination setZoom:fmin(size.width / NSWidth(bounds), 
size.height / NSHeight(bounds))];
             return destination;
         }

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