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.
This commit is contained in:
@@ -4165,12 +4165,6 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
|
|||||||
direct_link_customdata(fd, &mesh->ldata, mesh->totloop);
|
direct_link_customdata(fd, &mesh->ldata, mesh->totloop);
|
||||||
direct_link_customdata(fd, &mesh->pdata, mesh->totpoly);
|
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->bb = NULL;
|
||||||
mesh->edit_btmesh = NULL;
|
mesh->edit_btmesh = NULL;
|
||||||
|
|
||||||
@@ -4179,6 +4173,12 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
|
|||||||
mesh->totselect = 0;
|
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 */
|
/* Multires data */
|
||||||
mesh->mr= newdataadr(fd, mesh->mr);
|
mesh->mr= newdataadr(fd, mesh->mr);
|
||||||
if (mesh->mr) {
|
if (mesh->mr) {
|
||||||
|
Reference in New Issue
Block a user