This commit is contained in:
crschnick 2024-08-10 14:11:19 +00:00
parent fbd1f1c5ce
commit 860ae0ee60

View file

@ -274,8 +274,11 @@ public abstract class DataStorage {
public void updateEntry(DataStoreEntry entry, DataStoreEntry newEntry) { public void updateEntry(DataStoreEntry entry, DataStoreEntry newEntry) {
var state = entry.getStorePersistentState(); var state = entry.getStorePersistentState();
var newState = state.mergeCopy(newEntry.getStorePersistentState()); var nState = newEntry.getStorePersistentState();
newEntry.setStorePersistentState(newState); if (state != null && nState != null) {
var updatedState = state.mergeCopy(nState);
newEntry.setStorePersistentState(updatedState);
}
var oldParent = DataStorage.get().getDefaultDisplayParent(entry); var oldParent = DataStorage.get().getDefaultDisplayParent(entry);
var newParent = DataStorage.get().getDefaultDisplayParent(newEntry); var newParent = DataStorage.get().getDefaultDisplayParent(newEntry);