diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-10-07 20:48:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-10-07 20:48:26 +0400 |
commit | 6aedad4bff8a455370d6319aafe4296859faee43 (patch) | |
tree | 91ff0a41f5377b72a8559c13bfe8f78039eb3c88 /source | |
parent | 098207e634699546c0b2409fbce68e345ba80f00 (diff) |
fix for crash on load if the file was saved in editmesh,
BKE_mesh_uv_cdlayer_rename_index was checking editmesh pointer before it was NULL'd by direct_link_mesh.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fad0b709baf..b673246a38f 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4164,12 +4164,6 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh) direct_link_customdata(fd, &mesh->fdata, mesh->totface); direct_link_customdata(fd, &mesh->ldata, mesh->totloop); direct_link_customdata(fd, &mesh->pdata, mesh->totpoly); - - if (mesh->mloopuv || mesh->mtpoly) { - /* for now we have to ensure texpoly and mloopuv layers are aligned - * in the future we may allow non-aligned layers */ - BKE_mesh_cd_validate(mesh); - } mesh->bb = NULL; mesh->edit_btmesh = NULL; @@ -4179,6 +4173,12 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh) mesh->totselect = 0; } + if (mesh->mloopuv || mesh->mtpoly) { + /* for now we have to ensure texpoly and mloopuv layers are aligned + * in the future we may allow non-aligned layers */ + BKE_mesh_cd_validate(mesh); + } + /* Multires data */ mesh->mr= newdataadr(fd, mesh->mr); if (mesh->mr) { |