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_mesh.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_mesh.c')
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 479e449958b..80c98e8c428 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -305,6 +305,7 @@ static void rna_MeshFace_material_index_range(PointerRNA *ptr, int *min, int *ma
Mesh *me= (Mesh*)ptr->id.data;
*min= 0;
*max= me->totcol-1;
+ *max= MAX2(0, *max);
}
static CustomData *rna_mesh_fdata(Mesh *me)