From: Matti Tahvonen Date: Mon, 26 Nov 2007 13:24:02 +0000 (+0000) Subject: added null check X-Git-Tag: 6.7.0.beta1~5454 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a5e969fb1cb1a9bc6cc2a019b463c8b5ac861ad3;p=vaadin-framework.git added null check svn changeset:2965/svn branch:trunk --- 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 } }