Fix T43560: crash when loading old (2.45 here) file whith multires.

Was trying to free a NULL pointer...
This commit is contained in:
Bastien Montagne 2015-02-04 21:43:01 +01:00
parent 37ae32870e
commit 4e27f63828
Notes: blender-bot 2023-02-14 09:31:59 +01:00
Referenced by issue #43572, transfer UV error
Referenced by issue #43576, Blender crashes when I try to erase grease pencil
Referenced by issue #43560, I found some ancient file that crashes Blender
1 changed files with 2 additions and 1 deletions

View File

@ -1641,7 +1641,8 @@ void multires_free(Multires *mr)
lvl = lvl->next;
}
MEM_freeN(mr->verts);
/* mr->verts may be NULL when loading old files, see direct_link_mesh() in readfile.c, and T43560. */
MEM_SAFE_FREE(mr->verts);
BLI_freelistN(&mr->levels);