Allow for multiple connections with same name and fix NPE

This commit is contained in:
crschnick 2023-12-30 02:17:13 +00:00
parent fb3b768352
commit bb1aa5c245

View file

@ -337,7 +337,7 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
}
// We didn't change anything
if (existingEntry.getStore().equals(store.getValue())) {
if (existingEntry != null && existingEntry.getStore().equals(store.getValue())) {
return true;
}
@ -347,15 +347,6 @@ public class GuiDsStoreCreator extends MultiStepComp.Step<CompStructure<?>> {
}
}
if (!exists) {
if (name.getValue() != null
&& DataStorage.get().getStoreEntryIfPresent(name.getValue()).isPresent()) {
messageProp.setValue("Store with name " + name.getValue() + " does already exist");
changedSinceError.setValue(false);
return false;
}
}
if (!validator.getValue().validate()) {
var msg = validator
.getValue()