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:
authorClément Foucault <foucault.clem@gmail.com>2019-05-30 20:33:48 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-05-30 20:33:48 +0300
commit493eaaf213dac66cb22b2c1c0b5400295afee6c3 (patch)
treee561c8516035c3eddce83622837b8dc2c24b4836
parent8f4b7083d3a553d5cf00df1bfcda8da4035f0654 (diff)
DRW: Fix crash when object has no bounding box
-rw-r--r--source/blender/draw/intern/draw_manager_data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index 7ac7fdf1ff2..27d4194db5c 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -407,9 +407,9 @@ static DRWCallState *drw_call_state_create(DRWShadingGroup *shgroup, float (*obm
DRWCullingState *cull = BLI_memblock_alloc(DST.vmempool->cullstates);
state->culling = cull;
- if (ob != NULL) {
+ BoundBox *bbox;
+ if (ob != NULL && (bbox = BKE_object_boundbox_get(ob))) {
float corner[3];
- BoundBox *bbox = BKE_object_boundbox_get(ob);
/* Get BoundSphere center and radius from the BoundBox. */
mid_v3_v3v3(cull->bsphere.center, bbox->vec[0], bbox->vec[6]);
mul_v3_m4v3(corner, obmat, bbox->vec[0]);