Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2018-11-27 12:43:01 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2018-11-27 12:43:01 +0300
commit47bf0a33ef987a21bf717dcedcc282d39e66bb99 (patch)
treef0c57014cf88f3293696760d3c09f40c032507fa /source/blender/editors/sculpt_paint/sculpt.c
parent1944bca49a22c18b059d84daf56908b6e15591ad (diff)
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...
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c5
1 files changed, 3 insertions, 2 deletions
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;