diff options
author | Juha Mäki-Kanto <ih5235252@gmail.com> | 2012-02-19 21:55:09 +0400 |
---|---|---|
committer | Juha Mäki-Kanto <ih5235252@gmail.com> | 2012-02-19 21:55:09 +0400 |
commit | d6deca4e9d6bc7faff98644286571c7934324a9d (patch) | |
tree | b6d890193d878ea0a2e5b046c27ff595621d5dbb /source | |
parent | 5cd85ed57ea649c58c7c19d709bfc4cae7fffcad (diff) |
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 :]
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/collada/MeshImporter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 */ |