]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #3761: MenuBar breaks the application completely
authorJouni Koivuviita <jouni.koivuviita@itmill.com>
Wed, 25 Nov 2009 09:25:02 +0000 (09:25 +0000)
committerJouni Koivuviita <jouni.koivuviita@itmill.com>
Wed, 25 Nov 2009 09:25:02 +0000 (09:25 +0000)
svn changeset:10005/svn branch:6.2

src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java

index 0e09c7a2876a9b35cfd2ad9ee0204cb94d2cc1c2..1a3d37283865cf7579db75f65dddb2dfd8625e89 100644 (file)
@@ -756,7 +756,8 @@ public class VMenuBar extends Widget implements Paintable,
     public void iLayout() {
         // Only collapse if there is more than one item in the root menu and the
         // menu has an explicit size
-        if ((getItems().size() > 1 || collapsedRootItems.getItems().size() > 0)
+        if ((getItems().size() > 1 || (collapsedRootItems != null && collapsedRootItems
+                .getItems().size() > 0))
                 && getElement().getStyle().getProperty("width") != null
                 && moreItem != null) {