From 491e476a07f76138b5582571da35e14ddd674fb9 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 17 Apr 2017 16:27:05 +0300 Subject: [PATCH] NPE under jdk9 --- platform/util/src/com/intellij/openapi/util/IconLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/util/src/com/intellij/openapi/util/IconLoader.java b/platform/util/src/com/intellij/openapi/util/IconLoader.java index 222f40fc4066..e2681904fd7f 100644 --- a/platform/util/src/com/intellij/openapi/util/IconLoader.java +++ b/platform/util/src/com/intellij/openapi/util/IconLoader.java @@ -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; }