diff options
author | Marc Englund <marc@vaadin.com> | 2012-11-06 10:44:46 +0200 |
---|---|---|
committer | Marc Englund <marc@vaadin.com> | 2012-11-06 10:44:46 +0200 |
commit | 71080f99e0f364ba2a4315b53d76d711eedca7e4 (patch) | |
tree | f05ecfee62e937346872011c501adf1ec947d7da /client | |
parent | 042e41b5fef2b860457e247eee7d443d3ef9b8f0 (diff) | |
download | vaadin-framework-71080f99e0f364ba2a4315b53d76d711eedca7e4.tar.gz vaadin-framework-71080f99e0f364ba2a4315b53d76d711eedca7e4.zip |
Fix for #10126 - npe when using 'plain GWT' popup panel. Applied patch by mgrankvi, and also did the same change to the mozilla variant.
Change-Id: If6da959be0440b522bdb6b6ed6e78eec63a96620
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VPopupImpl.java | 7 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/VPopupImplMozilla.java | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/client/src/com/vaadin/client/ui/VPopupImpl.java b/client/src/com/vaadin/client/ui/VPopupImpl.java index 842025a94f..621069770a 100644 --- a/client/src/com/vaadin/client/ui/VPopupImpl.java +++ b/client/src/com/vaadin/client/ui/VPopupImpl.java @@ -8,8 +8,11 @@ public class VPopupImpl extends PopupImpl { @Override public void onShow(Element popup) { // Move the overlay to the appropriate overlay container - Element e = VOverlay.current.getOverlayContainer(); - e.appendChild(popup); + final VOverlay overlay = VOverlay.current; + if (overlay != null) { + final Element e = overlay.getOverlayContainer(); + e.appendChild(popup); + } super.onShow(popup); } diff --git a/client/src/com/vaadin/client/ui/VPopupImplMozilla.java b/client/src/com/vaadin/client/ui/VPopupImplMozilla.java index 4e5b46f056..7ae5c34e9e 100644 --- a/client/src/com/vaadin/client/ui/VPopupImplMozilla.java +++ b/client/src/com/vaadin/client/ui/VPopupImplMozilla.java @@ -8,8 +8,11 @@ public class VPopupImplMozilla extends PopupImplMozilla { @Override public void onShow(Element popup) { // Move the overlay to the appropriate overlay container - Element e = VOverlay.current.getOverlayContainer(); - e.appendChild(popup); + final VOverlay overlay = VOverlay.current; + if (overlay != null) { + final Element e = overlay.getOverlayContainer(); + e.appendChild(popup); + } super.onShow(popup); } |