[Bf-blender-cvs] [47bf0a33ef9] blender2.8: Fix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.
Bastien Montagne
noreply at git.blender.org
Tue Nov 27 10:45:19 CET 2018
Commit: 47bf0a33ef987a21bf717dcedcc282d39e66bb99
Author: Bastien Montagne
Date: Tue Nov 27 10:43:01 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB47bf0a33ef987a21bf717dcedcc282d39e66bb99
Fix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.
Accessing ob->bb directly is not a good idea anyway.
Still, would like to know why/where this bbox is freed, since it is
allocated at least once by depsgraph eval, as part of
`BKE_object_handle_data_update()` function...
===================================================================
M source/blender/editors/sculpt_paint/sculpt.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index fd1b331d76e..a497d555296 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3954,8 +3954,9 @@ static void do_tiled(Sculpt *sd, Object *ob, Brush *brush, UnifiedPaintSettings
SculptSession *ss = ob->sculpt;
StrokeCache *cache = ss->cache;
const float radius = cache->radius;
- const float *bbMin = ob->bb->vec[0];
- const float *bbMax = ob->bb->vec[6];
+ BoundBox *bb = BKE_object_boundbox_get(ob);
+ const float *bbMin = bb->vec[0];
+ const float *bbMax = bb->vec[6];
const float *step = sd->paint.tile_offset;
int dim;
More information about the Bf-blender-cvs
mailing list