From 66bf6487dfc624c1423053cd570bbe720ae20cf2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 18 Apr 2011 01:45:28 +0000 Subject: [PATCH] object.collision was allocating on access for all object types - camera could get collision data for eg. now check for mesh types only. any other type will return None. --- source/blender/makesrna/intern/rna_object.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index babc413e274..a30b5d4eb05 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1059,6 +1059,9 @@ static PointerRNA rna_Object_collision_get(PointerRNA *ptr) { Object *ob= (Object*)ptr->id.data; + if(ob->type != OB_MESH) + return PointerRNA_NULL; + /* weak */ if(!ob->pd) ob->pd= object_add_collision_fields(0);