summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-02-08 09:06:15 +0200
committerLeif Åstrand <leif@vaadin.com>2012-02-08 09:06:15 +0200
commit2bb7aae1c0cd44ad1ca260dec70b3225c8a226ac (patch)
treeb9bd1596b5a0e974740150f90ec761c660898ea6
parenta328f692ffda3c6868fd1e889240f74aac607e6f (diff)
downloadvaadin-framework-2bb7aae1c0cd44ad1ca260dec70b3225c8a226ac.tar.gz
vaadin-framework-2bb7aae1c0cd44ad1ca260dec70b3225c8a226ac.zip
getParent() shouldn't throw npe when widget's parent is null (#8323)
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java b/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java
index efe6896e9b..355516ccd1 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VAbstractPaintableWidget.java
@@ -94,15 +94,15 @@ public abstract class VAbstractPaintableWidget implements VPaintableWidget {
VPaintableMap paintableMap = VPaintableMap.get(getConnection());
Widget w = getWidgetForPaintable();
- while (w != null) {
+ while (true) {
w = w.getParent();
+ if (w == null) {
+ return null;
+ }
if (paintableMap.isPaintable(w)) {
- return (VPaintableWidgetContainer) paintableMap
- .getPaintable(w);
+ return (VPaintableWidgetContainer) paintableMap.getPaintable(w);
}
}
-
- return null;
}
protected static boolean isRealUpdate(UIDL uidl) {