[Bf-blender-cvs] [5adb670] alembic_basic_io: Fix crash dereferencing null BoundBox pointer.
Kévin Dietrich
noreply at git.blender.org
Fri Jun 3 19:19:43 CEST 2016
Commit: 5adb6700b04c8970eaaec8a66931756b3764f1bb
Author: Kévin Dietrich
Date: Fri Jun 3 15:30:08 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB5adb6700b04c8970eaaec8a66931756b3764f1bb
Fix crash dereferencing null BoundBox pointer.
===================================================================
M source/blender/alembic/intern/abc_object.cc
===================================================================
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index 15110fa..39dd355 100644
--- a/source/blender/alembic/intern/abc_object.cc
+++ b/source/blender/alembic/intern/abc_object.cc
@@ -90,6 +90,14 @@ Imath::Box3d AbcObjectWriter::bounds()
{
BoundBox *bb = BKE_object_boundbox_get(this->m_object);
+ if (!bb) {
+ if (this->m_object->type != OB_CAMERA) {
+ std::cerr << "Boundbox is null!\n";
+ }
+
+ return Imath::Box3d();
+ }
+
/* Convert Z-up to Y-up. */
this->m_bounds.min.x = bb->vec[0][0];
this->m_bounds.min.y = bb->vec[0][2];
More information about the Bf-blender-cvs
mailing list