Revision: 27897
http://sourceforge.net/p/bibdesk/svn/27897
Author: hofman
Date: 2022-09-16 12:09:32 +0000 (Fri, 16 Sep 2022)
Log Message:
-----------
make sure we don't divide by zero
Modified Paths:
--------------
trunk/bibdesk/BDSKStatusBar.m
Modified: trunk/bibdesk/BDSKStatusBar.m
===================================================================
--- trunk/bibdesk/BDSKStatusBar.m 2022-09-16 11:58:37 UTC (rev 27896)
+++ trunk/bibdesk/BDSKStatusBar.m 2022-09-16 12:09:32 UTC (rev 27897)
@@ -104,7 +104,7 @@
- (NSSize)cellSizeForIcon:(NSImage *)icon {
NSSize iconSize = [icon size];
CGFloat cellHeight = NSHeight([self bounds]) - 2.0;
- CGFloat cellWidth = iconSize.width * cellHeight / iconSize.height;
+ CGFloat cellWidth = cellHeight * (iconSize.height > 0.0 ? iconSize.width /
iconSize.height : 1.0);
return NSMakeSize(cellWidth, cellHeight);
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit