[vcs-log] if a tab state is somehow null create a new one EA-90491
authorJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Wed, 26 Oct 2016 14:12:32 +0000 (17:12 +0300)
committerJulia Beliaeva <Julia.Beliaeva@jetbrains.com>
Wed, 26 Oct 2016 14:12:32 +0000 (17:12 +0300)
platform/vcs-log/impl/src/com/intellij/vcs/log/data/VcsLogTabsProperties.java

index 476b035859325f3d77bce7b92d165297533b6370..08a53b42111b60e2ed441edb390b8c42e0050cb7 100644 (file)
@@ -50,7 +50,12 @@ public class VcsLogTabsProperties implements PersistentStateComponent<VcsLogTabs
       @NotNull
       @Override
       public State getState() {
-        return myState.TAB_STATES.get(id);
+        State state = myState.TAB_STATES.get(id);
+        if (state == null) {
+          state = new VcsLogUiPropertiesImpl.State();
+          myState.TAB_STATES.put(id, state);
+        }
+        return state;
       }
 
       @Override