diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-08-19 06:22:35 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-08-19 06:22:46 +0300 |
commit | 5f7611a8f14e177b4d2d2391ebc4725eafdf4073 (patch) | |
tree | 2523bb5834ed2848bf5f882251cf24b6b6bba427 /source/blender/alembic | |
parent | bf4875001de10d0053fc9377fa98349bd6e1e8a9 (diff) |
Alembic: fix crash accessing invalid objects.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_util.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h index 8cdfe21e43f..648570f5f27 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); |