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:
authorHans Goudey <h.goudey@me.com>2021-10-11 04:53:56 +0300
committerHans Goudey <h.goudey@me.com>2021-10-11 04:53:56 +0300
commitd2454487d1ee97caa270478aa0ef0bc8e5471ea1 (patch)
tree7e8c5177918d63bfa64824bf164f7f40fb68d769
parent1bfa9539d3b50da2530c6273d2f692fb57f9c267 (diff)
Fix: Incorrect custom property edit string to int change
This fixed an error in a corner case, and is a reasonable check anyway.
-rw-r--r--release/scripts/startup/bl_operators/wm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 1ce2beca509..17552b6e013 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1419,7 +1419,7 @@ class WM_OT_properties_edit(Operator):
# Helper method to avoid repetative code to retrieve a single value from sequences and non-sequences.
@staticmethod
def _convert_new_value_single(old_value, new_type):
- if hasattr(old_value, "__len__"):
+ if hasattr(old_value, "__len__") and len(old_value) > 0:
return new_type(old_value[0])
return new_type(old_value)