From 70f2389f5a9052efab319d0b21999db7bcfc73b0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 1 Feb 2014 01:45:09 +1100 Subject: Code cleanup: be less vague checking invalid index values --- source/blender/makesrna/intern/rna_texture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_texture.c') diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index 37a0ee0da8e..b0e1ed04790 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -304,8 +304,9 @@ char *rna_TextureSlot_path(PointerRNA *ptr) if (prop) { int index = RNA_property_collection_lookup_index(&id_ptr, prop, ptr); - if (index >= 0) + if (index != -1) { return BLI_sprintfN("texture_slots[%d]", index); + } } } } -- cgit v1.2.3