mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10: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) {
|
||||
var state = entry.getStorePersistentState();
|
||||
var newState = state.mergeCopy(newEntry.getStorePersistentState());
|
||||
newEntry.setStorePersistentState(newState);
|
||||
var nState = newEntry.getStorePersistentState();
|
||||
if (state != null && nState != null) {
|
||||
var updatedState = state.mergeCopy(nState);
|
||||
newEntry.setStorePersistentState(updatedState);
|
||||
}
|
||||
|
||||
var oldParent = DataStorage.get().getDefaultDisplayParent(entry);
|
||||
var newParent = DataStorage.get().getDefaultDisplayParent(newEntry);
|
||||
|
|
Loading…
Reference in a new issue