diff --git a/src/main/java/electrosphere/main/structure/ProjectStructure.java b/src/main/java/electrosphere/main/structure/ProjectStructure.java index 02896d1..6faabaf 100644 --- a/src/main/java/electrosphere/main/structure/ProjectStructure.java +++ b/src/main/java/electrosphere/main/structure/ProjectStructure.java @@ -325,6 +325,11 @@ public class ProjectStructure { * @return the id */ private int getFieldId(String bTreeName, String fieldName){ + //init the map if it doesn't already exist (ie the file doesn't exist) + if(existingFieldNameToIdMap == null){ + existingFieldNameToIdMap = new HashMap(); + } + //get the id String qualifiedName = bTreeName.toUpperCase() + "_" + fieldName.toUpperCase(); if(existingFieldNameToIdMap.containsKey(qualifiedName)){ return existingFieldNameToIdMap.get(qualifiedName);