From 71080f99e0f364ba2a4315b53d76d711eedca7e4 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Tue, 6 Nov 2012 10:44:46 +0200 Subject: [PATCH] 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 --- client/src/com/vaadin/client/ui/VPopupImpl.java | 7 +++++-- 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); } -- 2.39.5