- if ( getCurrentTreePanel().isCurrentTreeIsSubtree() ) {
- JOptionPane
- .showMessageDialog( this,
- "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",
- "Operation can not be exectuted on a sub-tree",
- JOptionPane.WARNING_MESSAGE );
- return true;
+ if ( getCurrentTreePanel() != null ) {
+ if ( getCurrentTreePanel().isCurrentTreeIsSubtree() ) {
+ JOptionPane
+ .showMessageDialog( this,
+ "This operation can only be performed on a complete tree, not on the currently displayed sub-tree only.",
+ "Operation can not be exectuted on a sub-tree",
+ JOptionPane.WARNING_MESSAGE );
+ return true;
+ }