8294567: IGV: IllegalStateException in search

Reviewed-by: rcastanedalo, chagedorn, kvn
This commit is contained in:
Tobias Holenstein 2022-10-03 07:14:16 +00:00
parent bc668b994d
commit 6e8f0387d6

View File

@ -49,7 +49,7 @@ public class EditorInputGraphProvider implements InputGraphProvider {
@Override @Override
public InputGraph getGraph() { public InputGraph getGraph() {
if (editor != null && editor.isOpened()) { if (editor != null) {
return editor.getModel().getGraphToView(); return editor.getModel().getGraphToView();
} else { } else {
return null; return null;
@ -58,14 +58,14 @@ public class EditorInputGraphProvider implements InputGraphProvider {
@Override @Override
public void setSelectedNodes(Set<InputNode> nodes) { public void setSelectedNodes(Set<InputNode> nodes) {
if (editor != null && editor.isOpened()) { if (editor != null) {
editor.setSelectedNodes(nodes); editor.setSelectedNodes(nodes);
} }
} }
@Override @Override
public Iterable<InputGraph> searchBackward() { public Iterable<InputGraph> searchBackward() {
if (editor != null && editor.isOpened()) { if (editor != null) {
return editor.getModel().getGraphsBackward(); return editor.getModel().getGraphsBackward();
} else { } else {
return null; return null;
@ -74,7 +74,7 @@ public class EditorInputGraphProvider implements InputGraphProvider {
@Override @Override
public Iterable<InputGraph> searchForward() { public Iterable<InputGraph> searchForward() {
if (editor != null && editor.isOpened()) { if (editor != null) {
return editor.getModel().getGraphsForward(); return editor.getModel().getGraphsForward();
} else { } else {
return null; return null;