From d6deca4e9d6bc7faff98644286571c7934324a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juha=20M=C3=A4ki-Kanto?= Date: Sun, 19 Feb 2012 17:55:09 +0000 Subject: Fix #30230, Crash after importing collada file On collada import a -1 layer_index from CustomData_get_layer_index (CD_MTFACE) was used. This then managed to overwrite last mface's data with uv-set's name so at least it gave a clue where to look for :] --- source/blender/collada/MeshImporter.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/collada') diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp index 1e5783f8ad0..92852120bca 100644 --- a/source/blender/collada/MeshImporter.cpp +++ b/source/blender/collada/MeshImporter.cpp @@ -746,6 +746,9 @@ MTex *MeshImporter::assign_textures_to_uvlayer(COLLADAFW::TextureCoordinateBindi const CustomData *data = &me->fdata; int layer_index = CustomData_get_layer_index(data, CD_MTFACE); + + if(layer_index == -1) return NULL; + CustomDataLayer *cdl = &data->layers[layer_index+setindex]; /* set uvname to bind_vertex_input semantic */ -- cgit v1.2.3