NPE
authorAlexey Kudravtsev <cdr@intellij.com>
Mon, 24 Oct 2016 14:21:46 +0000 (17:21 +0300)
committerAlexey Kudravtsev <cdr@intellij.com>
Mon, 24 Oct 2016 14:23:25 +0000 (17:23 +0300)
platform/core-api/src/com/intellij/openapi/util/Iconable.java

index 025826e26645e49cac86d7fa111a60512d3867e5..a372a53e2aca65379fd378e941410302c5dc1012 100644 (file)
@@ -45,8 +45,10 @@ public interface Iconable {
 
     public static void put(@NotNull UserDataHolder holder, Icon icon, int flags) {
       ConcurrentIntObjectMap<Icon> map = holder.getUserData(LAST_COMPUTED_ICON);
-      if (icon == null && map != null) {
-        map.remove(flags);
+      if (icon == null) {
+        if (map != null) {
+          map.remove(flags);
+        }
       }
       else {
         if (map == null) {