[Bf-blender-cvs] [53311fe] alembic_basic_io: Fix crash dereferencing nullptr.

Kévin Dietrich noreply at git.blender.org
Mon Jun 13 18:05:17 CEST 2016


Commit: 53311fe6d1f5b6776387b8359f41807120837527
Author: Kévin Dietrich
Date:   Mon Jun 13 13:18:18 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB53311fe6d1f5b6776387b8359f41807120837527

Fix crash dereferencing nullptr.

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

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

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

diff --git a/source/blender/alembic/intern/abc_mesh.cc b/source/blender/alembic/intern/abc_mesh.cc
index 45b8716..90ad4de 100644
--- a/source/blender/alembic/intern/abc_mesh.cc
+++ b/source/blender/alembic/intern/abc_mesh.cc
@@ -1209,6 +1209,10 @@ void AbcMeshReader::readPolyDataSample(Mesh *mesh,
 	const ICompoundProperty &arb_geom_params = (m_schema.valid() ? m_schema.getArbGeomParams()
 	                                                             : m_subd_schema.getArbGeomParams());
 
+	if (!arb_geom_params.valid()) {
+		return;
+	}
+
 	const size_t num_props = arb_geom_params.getNumProperties();
 
 	for (size_t i = 0; i < num_props; ++i) {




More information about the Bf-blender-cvs mailing list