GP-1013 - Function Graph - fixed exception when setting background for

Function Graph after the window was opened and then closed

Closes #3058
This commit is contained in:
dragonmacher 2021-06-03 18:36:34 -04:00
parent 3c08837a45
commit 4ee4be5fef
2 changed files with 4 additions and 1 deletions

View file

@ -186,6 +186,7 @@ public class FunctionGraphPlugin extends ProgramPlugin implements OptionsChangeL
connectedProvider.getComponent().repaint();
for (FGProvider provider : disconnectedProviders) {
provider.optionsChanged();
provider.getComponent().repaint();
}
}

View file

@ -162,7 +162,9 @@ public class VisualGraphView<V extends VisualVertex,
* Called when the options used by this graph view have changed
*/
public void optionsChanged() {
graphComponent.optionsChanged();
if (graphComponent != null) { // will be null after being closed
graphComponent.optionsChanged();
}
}
/**