mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Fix NPE
This commit is contained in:
parent
fbd1f1c5ce
commit
860ae0ee60
1 changed files with 5 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue