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>2014-01-31 18:45:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-31 19:01:00 +0400
commit70f2389f5a9052efab319d0b21999db7bcfc73b0 (patch)
tree8b9cddee8b3fd2d44abbeb7662979a9db3e7208b /source/blender/makesrna/intern/rna_color.c
parent1af6e656ec60b3dcebe722c9c8cf6b133ec0b411 (diff)
Code cleanup: be less vague checking invalid index values
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r--source/blender/makesrna/intern/rna_color.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index de19622148e..cfbf0193649 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -228,7 +228,7 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr)
prop = RNA_struct_find_property(&ramp_ptr, "elements"); \
if (prop) { \
index = RNA_property_collection_lookup_index(&ramp_ptr, prop, ptr); \
- if (index >= 0) { \
+ if (index != -1) { \
char *texture_path = rna_ColorRamp_path(&ramp_ptr); \
path = BLI_sprintfN("%s.elements[%d]", texture_path, index); \
MEM_freeN(texture_path); \