]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed NPE in Slider (#9740) 36/336/1
authorArtur Signell <artur@vaadin.com>
Thu, 22 Nov 2012 11:11:18 +0000 (13:11 +0200)
committerArtur Signell <artur@vaadin.com>
Thu, 22 Nov 2012 11:11:18 +0000 (13:11 +0200)
Change-Id: I08c769cbe87c2bb8d94bb18d6685df0385d0eae8

client/src/com/vaadin/client/ui/VSlider.java

index 3fdd8f031317a36e8912bffedf5c7bd59d59895e..3951550dd2ce2db4eac3edc4c305eb62cf8e220b 100644 (file)
@@ -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()) {