mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Make store creation more resilient when parent is deleted
This commit is contained in:
parent
a4faa7c04c
commit
0b0e92e9da
1 changed files with 6 additions and 1 deletions
|
@ -115,7 +115,7 @@ public class StoreCreationComp extends DialogComp {
|
||||||
DataStorage.get().getSelectedCategory().getUuid(),
|
DataStorage.get().getSelectedCategory().getUuid(),
|
||||||
name.getValue(),
|
name.getValue(),
|
||||||
store.getValue());
|
store.getValue());
|
||||||
var p = provider.getValue().getDisplayParent(testE);
|
var p = DataStorage.get().getDefaultDisplayParent(testE).orElse(null);
|
||||||
|
|
||||||
var targetCategory = p != null
|
var targetCategory = p != null
|
||||||
? p.getCategoryUuid()
|
? p.getCategoryUuid()
|
||||||
|
@ -271,6 +271,11 @@ public class StoreCreationComp extends DialogComp {
|
||||||
}
|
}
|
||||||
|
|
||||||
ThreadHelper.runAsync(() -> {
|
ThreadHelper.runAsync(() -> {
|
||||||
|
// Might have changed since last time
|
||||||
|
if (entry.getValue() == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try (var b = new BooleanScope(busy).start()) {
|
try (var b = new BooleanScope(busy).start()) {
|
||||||
DataStorage.get().addStoreEntryInProgress(entry.getValue());
|
DataStorage.get().addStoreEntryInProgress(entry.getValue());
|
||||||
entry.getValue().validateOrThrow();
|
entry.getValue().validateOrThrow();
|
||||||
|
|
Loading…
Reference in a new issue