Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-06-29 05:00:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-29 05:09:00 +0300
commit29a73106b45aa8d2367aebc3fde43cc2e2f5341e (patch)
tree123e2307e23f0e9ed6ffe1cb30b7a2ab4ea41471
parent20f634cfc21086777164dd1ba1287181c037d911 (diff)
UI: prevent softrange from becoming nan
Quiets assert
-rw-r--r--source/blender/editors/interface/interface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 77990066027..ba7240be5d8 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2576,9 +2576,11 @@ static void ui_set_but_soft_range(uiBut *but)
}
else if (but->poin && (but->pointype & UI_BUT_POIN_TYPES)) {
float value = ui_but_value_get(but);
- CLAMP(value, but->hardmin, but->hardmax);
- but->softmin = min_ff(but->softmin, value);
- but->softmax = max_ff(but->softmax, value);
+ if (isfinite(value)) {
+ CLAMP(value, but->hardmin, but->hardmax);
+ but->softmin = min_ff(but->softmin, value);
+ but->softmax = max_ff(but->softmax, value);
+ }
}
else {
BLI_assert(0);