summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/ui/AbstractComponent.java
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-12-14 15:27:46 +0000
committerArtur Signell <artur.signell@itmill.com>2009-12-14 15:27:46 +0000
commitf9af10668cb5d89d0913e7f0ad97f1b0e485dee9 (patch)
tree886244194e09fc65ba82e131912787c0128df0c3 /src/com/vaadin/ui/AbstractComponent.java
parent0e906dc5ab01ebc161b65d48fefc49a00d9048a9 (diff)
downloadvaadin-framework-f9af10668cb5d89d0913e7f0ad97f1b0e485dee9.tar.gz
vaadin-framework-f9af10668cb5d89d0913e7f0ad97f1b0e485dee9.zip
Fix for #3825 - AbstractComponentThrows NPE when both visible and enable is set to false
svn changeset:10289/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/ui/AbstractComponent.java')
-rw-r--r--src/com/vaadin/ui/AbstractComponent.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java
index 550ffbef0b..de1515d856 100644
--- a/src/com/vaadin/ui/AbstractComponent.java
+++ b/src/com/vaadin/ui/AbstractComponent.java
@@ -368,7 +368,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource
// is set visible again. This workaround is needed as isEnabled
// checks isVisible.
boolean needRepaint = (wasEnabledInContext != isEnabledInContext)
- || (wasEnabled != isEnabled && !parent.isVisible());
+ || (wasEnabled != isEnabled && (getParent() == null || !getParent()
+ .isVisible()));
if (needRepaint) {
requestRepaint();