aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/itmill/toolkit/demo/testbench/TestBench.java4
-rw-r--r--src/com/itmill/toolkit/tests/TestBench.java4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/com/itmill/toolkit/demo/testbench/TestBench.java b/src/com/itmill/toolkit/demo/testbench/TestBench.java
index 090ee9fe0a..0021cce8dd 100644
--- a/src/com/itmill/toolkit/demo/testbench/TestBench.java
+++ b/src/com/itmill/toolkit/demo/testbench/TestBench.java
@@ -139,13 +139,13 @@ public class TestBench extends com.itmill.toolkit.Application implements
bodyLayout.setCaption(null);
Object o = menu.getValue();
- if (o instanceof Class) {
+ if (o != null && o instanceof Class) {
Class c = (Class) o;
String title = c.getName();
bodyLayout.setCaption(title);
bodyLayout.addComponent(createTestable(c));
} else {
- // NOP node selected
+ // NOP node selected or deselected tree item
}
}
diff --git a/src/com/itmill/toolkit/tests/TestBench.java b/src/com/itmill/toolkit/tests/TestBench.java
index 6de3cc7111..d94548becf 100644
--- a/src/com/itmill/toolkit/tests/TestBench.java
+++ b/src/com/itmill/toolkit/tests/TestBench.java
@@ -144,13 +144,13 @@ public class TestBench extends com.itmill.toolkit.Application implements
bodyLayout.setCaption(null);
Object o = menu.getValue();
- if (o instanceof Class) {
+ if (o != null && o instanceof Class) {
Class c = (Class) o;
String title = c.getName();
bodyLayout.setCaption(title);
bodyLayout.addComponent(createTestable(c));
} else {
- // NOP node selected
+ // NOP node selected or deselected tree item
}
}