Fix T88605: Alembic import crashes when missing `arbGeomParams`

Add check for the `arbGeomParams` property being valid, before attempting
to access a sub-property from it.
This commit is contained in:
Sybren A. Stüvel 2021-06-18 11:21:13 +02:00
parent 060d668ae6
commit 7c68147709
Notes: blender-bot 2023-02-14 03:46:57 +01:00
Referenced by issue #93906, Alembic not importing UVs (if file incorrectly sets geoScope to kVertexScope - even though actual data implies kFacevaryingScope - which 2.93 handled gracefully)
Referenced by issue #88605, Alembic import crashes when missing `arbGeomParams`
1 changed files with 1 additions and 1 deletions

View File

@ -497,7 +497,7 @@ void read_generated_coordinates(const ICompoundProperty &prop,
const CDStreamConfig &config,
const Alembic::Abc::ISampleSelector &iss)
{
if (prop.getPropertyHeader(propNameOriginalCoordinates) == nullptr) {
if (!prop.valid() || prop.getPropertyHeader(propNameOriginalCoordinates) == nullptr) {
/* The ORCO property isn't there, so don't bother trying to process it. */
return;
}