[Bf-blender-cvs] [af6ba4dce51] master: Fix T73706: Crash after disabling dyntopo with multires modifier
Pablo Dobarro
noreply at git.blender.org
Tue Feb 11 16:33:28 CET 2020
Commit: af6ba4dce51136759d27d67a826eafdb421c2c74
Author: Pablo Dobarro
Date: Mon Feb 10 18:41:03 2020 +0100
Branches: master
https://developer.blender.org/rBaf6ba4dce51136759d27d67a826eafdb421c2c74
Fix T73706: Crash after disabling dyntopo with multires modifier
ss->multires is set in sculpt_update_object, which is not called just
after disabling dyntopo, so it needs to be checked before running
reshapeFromCCG
Reviewed By: campbellbarton, brecht
Maniphest Tasks: T73706
Differential Revision: https://developer.blender.org/D6801
===================================================================
M source/blender/blenkernel/intern/multires.c
===================================================================
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index 23fa8dd60d5..96608a931ab 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -410,7 +410,7 @@ void multires_flush_sculpt_updates(Object *ob)
{
if (ob && ob->sculpt && ob->sculpt->pbvh != NULL) {
SculptSession *sculpt_session = ob->sculpt;
- if (BKE_pbvh_type(sculpt_session->pbvh) == PBVH_GRIDS) {
+ if (BKE_pbvh_type(sculpt_session->pbvh) == PBVH_GRIDS && sculpt_session->multires) {
Mesh *mesh = ob->data;
multiresModifier_reshapeFromCCG(
sculpt_session->multires->totlvl, mesh, sculpt_session->subdiv_ccg);
More information about the Bf-blender-cvs
mailing list