mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
NPE trying to scale a missing image
This commit is contained in:
@@ -88,8 +88,10 @@ public class ImageCache {
|
||||
}
|
||||
|
||||
boolean mayEnlarge = Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_SCALE_LARGER);
|
||||
|
||||
BufferedImage original = getImage(key);
|
||||
if ( null == original )
|
||||
return null;
|
||||
|
||||
double scale = Math.min((double) width / original.getWidth(), (double) height / original.getHeight());
|
||||
// here would be the place to limit the scaling option in menu ?
|
||||
if ((scale > 1) && !mayEnlarge) {
|
||||
|
||||
Reference in New Issue
Block a user