From ea07d99b87ebf3640f219473e0edeaf650dbd303 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 13 Mar 2012 12:13:52 +0200 Subject: [PATCH] #8500 Print an error message instead of throwing NPE if parent cannot be found for some reason --- .../gwt/client/ui/AbstractComponentConnector.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java index 582fc3078c..b7aea9b735 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentConnector.java @@ -184,7 +184,14 @@ public abstract class AbstractComponentConnector extends AbstractConnector // Set captions if (delegateCaptionHandling()) { - getParent().updateCaption(this, uidl); + ComponentContainerConnector parent = getParent(); + if (parent != null) { + parent.updateCaption(this, uidl); + } else { + VConsole.error("Parent of connector " + + getClass().getName() + + " is null. This is typically an indication of a broken component hierarchy"); + } } /* -- 2.39.5