diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_displacement_multires.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_displacement_multires.c b/source/blender/blenkernel/intern/subdiv_displacement_multires.c index 5727c8d487b..638f7200145 100644 --- a/source/blender/blenkernel/intern/subdiv_displacement_multires.c +++ b/source/blender/blenkernel/intern/subdiv_displacement_multires.c @@ -479,6 +479,11 @@ void BKE_subdiv_displacement_attach_from_multires( { /* Make sure we don't have previously assigned displacement. */ BKE_subdiv_displacement_detach(subdiv); + /* It is possible to have mesh without MDISPS layer. Happens when using + * dynamic topology. */ + if (!CustomData_has_layer(&mesh->ldata, CD_MDISPS)) { + return; + } /* Allocate all required memory. */ SubdivDisplacement *displacement = MEM_callocN(sizeof(SubdivDisplacement), "multires displacement"); |