Skip to content

Commit 37956f8

Browse files
committed
make sure the cad parts list can not be made null
1 parent 4979fd7 commit 37956f8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/neuronrobotics/bowlerstudio/creature/MobileBaseCadManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,11 @@ public ArrayList<CSG> generateBody(MobileBase base, boolean clear) {
991991
} else
992992
getUi().highlightException(null, new Exception());
993993
ArrayList<CSG> arrayList = getBasetoCadMap().get(device);
994+
if (arrayList== null) {
995+
arrayList=new ArrayList<CSG>();
996+
getBasetoCadMap().put(device, arrayList);
997+
}
998+
994999
if (clear) {
9951000
arrayList.clear();
9961001
// System.gc();

0 commit comments

Comments
 (0)