diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-02 22:28:54 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-02 22:28:54 +0300 |
commit | 09014382151d518d724e86944829efa7f2c3f308 (patch) | |
tree | c351f18cb4a670b24fab6f66f80f4e9f6fcc9822 /source/blender/blenloader | |
parent | abb9475729afd40373a8185460d59c571d0722de (diff) |
Another multires loading fix: if edge_flags is null, allocate a new array
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 3eb9c494af5..de0135b45b0 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2536,8 +2536,11 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh) direct_link_customdata(fd, &mesh->mr->vdata, lvl->totvert); direct_link_dverts(fd, lvl->totvert, CustomData_get(&mesh->mr->vdata, 0, CD_MDEFORMVERT)); - mesh->mr->edge_flags= newdataadr(fd, mesh->mr->edge_flags); - + if(mesh->mr->edge_flags) + mesh->mr->edge_flags= newdataadr(fd, mesh->mr->edge_flags); + else + mesh->mr->edge_flags= MEM_callocN(sizeof(short)*lvl->totvert, "Multires Edge Flags"); + for(; lvl; lvl= lvl->next) { lvl->verts= newdataadr(fd, lvl->verts); lvl->faces= newdataadr(fd, lvl->faces); |