diff options
author | Artur Signell <artur@vaadin.com> | 2012-11-22 13:11:18 +0200 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-11-22 13:11:18 +0200 |
commit | 2b54961148e5ac7f341447ecb3e91e7ee5bb895b (patch) | |
tree | 4b818613bb5022cefb19e8b9a21a4ee1c96761fd /client | |
parent | c5ebc8f8aaa798133caa98c399dd316adea704f6 (diff) | |
download | vaadin-framework-2b54961148e5ac7f341447ecb3e91e7ee5bb895b.tar.gz vaadin-framework-2b54961148e5ac7f341447ecb3e91e7ee5bb895b.zip |
Fixed NPE in Slider (#9740)
Change-Id: I08c769cbe87c2bb8d94bb18d6685df0385d0eae8
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VSlider.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/src/com/vaadin/client/ui/VSlider.java b/client/src/com/vaadin/client/ui/VSlider.java index 3fdd8f0313..3951550dd2 100644 --- a/client/src/com/vaadin/client/ui/VSlider.java +++ b/client/src/com/vaadin/client/ui/VSlider.java @@ -195,6 +195,10 @@ public class VSlider extends SimpleFocusablePanel implements Field, // clear unnecessary opposite style attribute base.getStyle().clearProperty(oppositeStyleAttribute); + if (!getElement().hasParentElement()) { + return; + } + final Element p = getElement().getParentElement().cast(); if (p.getPropertyInt(domProperty) > 50) { if (isVertical()) { |