mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not access to the model from an obsolete command
This commit is contained in:
@@ -442,8 +442,14 @@ public final class AsyncTreeModel extends AbstractTreeModel implements Disposabl
|
||||
@Override
|
||||
public Node get() {
|
||||
started = true;
|
||||
LOG.debug("background command: ", this);
|
||||
return getNode(object);
|
||||
if (isObsolete()) {
|
||||
LOG.debug("obsolete command: ", this);
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
LOG.debug("background command: ", this);
|
||||
return getNode(object);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -543,7 +549,7 @@ public final class AsyncTreeModel extends AbstractTreeModel implements Disposabl
|
||||
@Override
|
||||
Node getNode(Object object) {
|
||||
Node loaded = new Node(object, model.isLeaf(object));
|
||||
if (loaded.leaf) return loaded;
|
||||
if (loaded.leaf || isObsolete()) return loaded;
|
||||
|
||||
if (model instanceof ChildrenProvider) {
|
||||
//noinspection unchecked
|
||||
|
||||
Reference in New Issue
Block a user