minor - added NPE check

This commit is contained in:
Heng Sin Low 2009-04-09 07:09:49 +00:00
parent 25f0f0fac8
commit 196dbbcad4
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ public class TreeSearchPanel extends Panel implements EventListener, TreeDataLis
String value = cmbSearch.getValue();
Object node = treeNodeItemMap.get(value);
Treeitem treeItem = null;
if (node instanceof Treeitem) {
if (node == null) {
return;
} else if (node instanceof Treeitem) {
treeItem = (Treeitem) node;
} else {
SimpleTreeNode sNode = (SimpleTreeNode) node;