diff options
Diffstat (limited to 'scene/gui/range.cpp')
-rw-r--r-- | scene/gui/range.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp index 362697b4ad..97775f2946 100644 --- a/scene/gui/range.cpp +++ b/scene/gui/range.cpp @@ -100,6 +100,7 @@ void Range::set_value(double p_val) { shared->emit_value_changed(); } void Range::set_min(double p_min) { + ERR_FAIL_COND_MSG(p_min >= shared->max, "Range cannot have min value higher or equal to its max value."); shared->min = p_min; set_value(shared->val); @@ -109,6 +110,7 @@ void Range::set_min(double p_min) { update_configuration_warning(); } void Range::set_max(double p_max) { + ERR_FAIL_COND_MSG(p_max <= shared->min, "Range cannot have max value lower or equal to its min value."); shared->max = p_max; set_value(shared->val); |