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>2011-06-23 10:13:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-06-23 10:13:21 +0400
commit53bf66a579789ad32e2e7c4bd15dca9863ba7e2d (patch)
tree8a820875ccbb49a71bdcef227097796a3f818f36 /source/blender/makesrna/intern/rna_modifier.c
parent353cd44301aba693b3541490a0da5e1e8cdd5c1c (diff)
checks in rna range functions that the max value cant be less than the min.
also fix for invalid rage for FILE_OT_filenum.
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index ff277b6d9b0..d2c1b862fee 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -404,7 +404,8 @@ static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max
MultiresModifierData *mmd = (MultiresModifierData*)ptr->data;
*min = 0;
- *max = mmd->totlvl;
+ *max = mmd->totlvl; /* intentionally _not_ -1 */
+ *max= MAX2(0, *max);
}
static int rna_MultiresModifier_external_get(PointerRNA *ptr)