2.5
authorTon Roosendaal <ton@blender.org>
Mon, 23 Feb 2009 17:30:00 +0000 (17:30 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 23 Feb 2009 17:30:00 +0000 (17:30 +0000)
Weightpaint could crash, wrong check for editmode mesh.

source/blender/editors/mesh/meshtools.c

index 22857b0718b54b52d1d590725b0e9f618b4b61a2..d835fdb8eed9f36f5845359710d1dd64118ff8ca 100644 (file)
@@ -713,7 +713,7 @@ intptr_t mesh_octree_table(Object *ob, EditMesh *em, float *co, char mode)
                if(MeshOctree.table) {
                        Mesh *me= ob->data;
                        bt= MeshOctree.table + mesh_octree_get_base_offs(co, MeshOctree.offs, MeshOctree.div);
-                       if(me->edit_mesh)
+                       if(em)
                                return mesh_octree_find_index(bt, NULL, NULL, co);
                        else
                                return mesh_octree_find_index(bt, MeshOctree.orco, me->mvert, co);