diff --git a/platform/util/src/com/intellij/openapi/util/IconLoader.java b/platform/util/src/com/intellij/openapi/util/IconLoader.java index a16af63471cf..d0ce5bc9f86f 100644 --- a/platform/util/src/com/intellij/openapi/util/IconLoader.java +++ b/platform/util/src/com/intellij/openapi/util/IconLoader.java @@ -324,15 +324,21 @@ public final class IconLoader { private Object myRealIcon; @NotNull private final URL myUrl; + private boolean dark; public CachedImageIcon(@NotNull URL url) { myUrl = url; + dark = USE_DARK_ICONS; } @NotNull private synchronized Icon getRealIcon() { if (isLoaderDisabled()) return EMPTY_ICON; + if (dark != USE_DARK_ICONS) { + myRealIcon = null; + dark = USE_DARK_ICONS; + } Object realIcon = myRealIcon; if (realIcon instanceof Icon) return (Icon)realIcon;