- changed status to resolved
NullPointerException error creating a network
Issue #159
resolved
When the org.openmarkov.full is launched and you try to create a network, an exception is fired.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.openmarkov.core.gui.dialog.network.NetworkDefinitionPanel.getCheckBoxShowCommentOnOpening(NetworkDefinitionPanel.java:284) [...] * The lines 284 of the class org.openmarkov.core.gui.dialog.network.NetworkDefinitionPanel* is:
jcheckBoxShowCommentOnOpening.setSelected(probNet.getShowCommentWhenOpening());
And when the network is being created, probNet is still null at this point. So, by analogy with other lines of the class, it could be rewritten as follows:
jcheckBoxShowCommentOnOpening.setSelected(probNet != null && probNet.getShowCommentWhenOpening());
Comments (1)
-
- Log in to comment
Fixed thanks to MIguel's recommendations.