NPE under jdk9

This commit is contained in:
Alexey Kudravtsev
2017-04-18 14:51:07 +03:00
parent a468b776b3
commit 491e476a07
@@ -269,12 +269,12 @@ public final class IconLoader {
@Nullable
private static ImageIcon checkIcon(final Image image, @NotNull URL url) {
if (image == null || image.getHeight(LabelHolder.ourFakeComponent) < 1) { // image wasn't loaded or broken
if (image == null || image.getHeight(null) < 1) { // image wasn't loaded or broken
return null;
}
final Icon icon = getIcon(image);
if (icon != null && !isGoodSize(icon)) {
if (!isGoodSize(icon)) {
LOG.error("Invalid icon: " + url); // # 22481
return EMPTY_ICON;
}