summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-05-14 00:44:42 +0300
committerArtur Signell <artur@vaadin.com>2012-05-14 02:10:31 +0300
commit97ae8edfab96fd8ca3c670140caae373db30c39e (patch)
treee99f3262b6215612bcdedfd1fa916f1d2e26dde0 /src
parentb52a8207073839958eedeaca5cd6c795eca76301 (diff)
downloadvaadin-framework-97ae8edfab96fd8ca3c670140caae373db30c39e.tar.gz
vaadin-framework-97ae8edfab96fd8ca3c670140caae373db30c39e.zip
Fixed problem with iterator containing null (#8729)
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/ui/Root.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/vaadin/ui/Root.java b/src/com/vaadin/ui/Root.java
index 07dd5a0f69..93b98693c2 100644
--- a/src/com/vaadin/ui/Root.java
+++ b/src/com/vaadin/ui/Root.java
@@ -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();
}