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];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to