[Bf-blender-cvs] [5f7611a] master: Alembic: fix crash accessing invalid objects.

Kévin Dietrich noreply at git.blender.org
Fri Aug 19 05:23:00 CEST 2016


Commit: 5f7611a8f14e177b4d2d2391ebc4725eafdf4073
Author: Kévin Dietrich
Date:   Fri Aug 19 05:22:35 2016 +0200
Branches: master
https://developer.blender.org/rB5f7611a8f14e177b4d2d2391ebc4725eafdf4073

Alembic: fix crash accessing invalid objects.

===================================================================

M	source/blender/alembic/intern/abc_util.h

===================================================================

diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h
index 8cdfe21..648570f 100644
--- a/source/blender/alembic/intern/abc_util.h
+++ b/source/blender/alembic/intern/abc_util.h
@@ -86,8 +86,11 @@ void get_min_max_time(const Alembic::AbcGeom::IObject &object, const Schema &sch
 {
 	get_min_max_time_ex(schema, min, max);
 
-	Alembic::AbcGeom::IXform parent(object.getParent(), Alembic::AbcGeom::kWrapExisting);
-	get_min_max_time_ex(parent.getSchema(), min, max);
+	const Alembic::AbcGeom::IObject &parent = object.getParent();
+	if (parent.valid() && Alembic::AbcGeom::IXform::matches(parent.getMetaData())) {
+		Alembic::AbcGeom::IXform xform(parent, Alembic::AbcGeom::kWrapExisting);
+		get_min_max_time_ex(xform.getSchema(), min, max);
+	}
 }
 
 bool has_property(const Alembic::Abc::ICompoundProperty &prop, const std::string &name);




More information about the Bf-blender-cvs mailing list