]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed problem with iterator containing null (#8729)
authorArtur Signell <artur@vaadin.com>
Sun, 13 May 2012 21:44:42 +0000 (00:44 +0300)
committerArtur Signell <artur@vaadin.com>
Sun, 13 May 2012 23:10:31 +0000 (02:10 +0300)
src/com/vaadin/ui/Root.java

index 07dd5a0f69a76345a6b1789847cbc95acfd1875a..93b98693c2c4f2aed8a19f45ba4d14b7f2c43ea4 100644 (file)
@@ -643,6 +643,10 @@ public abstract class Root extends AbstractComponentContainer implements
      * @see com.vaadin.ui.ComponentContainer#getComponentIterator()
      */
     public Iterator<Component> getComponentIterator() {
+        if (getContent() == null) {
+            return Collections.EMPTY_LIST.iterator();
+        }
+
         return Collections.singleton((Component) getContent()).iterator();
     }