[Bf-blender-cvs] [2c4564b044] master: Alembic: avoid crashing when reading non-indexed UV params.

Kévin Dietrich noreply at git.blender.org
Sat Feb 25 07:09:21 CET 2017


Commit: 2c4564b044ada4f7f5568735c197afce888d43df
Author: Kévin Dietrich
Date:   Sat Feb 25 07:08:14 2017 +0100
Branches: master
https://developer.blender.org/rB2c4564b044ada4f7f5568735c197afce888d43df

Alembic: avoid crashing when reading non-indexed UV params.

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

M	source/blender/alembic/intern/abc_customdata.cc

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

diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc
index ebf1b2ba96..0d11ab79dd 100644
--- a/source/blender/alembic/intern/abc_customdata.cc
+++ b/source/blender/alembic/intern/abc_customdata.cc
@@ -327,6 +327,11 @@ static void read_custom_data_ex(const ICompoundProperty &prop,
 	}
 	else if (data_type == CD_MLOOPUV) {
 		IV2fGeomParam uv_param(prop, prop_header.getName());
+
+		if (!uv_param.isIndexed()) {
+			return;
+		}
+
 		IV2fGeomParam::Sample sample;
 		uv_param.getIndexed(sample, iss);




More information about the Bf-blender-cvs mailing list