fixed drawKnob for the case where curValue or min/max are not yet initialized

This commit is contained in:
Axel Uhl committed 2015-07-17 12:15:03 +02:00
1 parent f590b71f4c
commit 4e9421110d
3 files changed
+25 -5

No files matched your search

@@ -182,7 +182,7 @@ public class TimeSlider extends SliderBar {
return;
Element knobElement = knobImage.getElement();
if(curValue >= minValue && curValue <= maxValue) {
if (curValue != null && minValue != null && maxValue != null && curValue >= minValue && curValue <= maxValue) {
// Move the knob to the correct position
int lineWidth = lineElement.getOffsetWidth();
int knobWidth = knobElement.getOffsetWidth();