[Bf-blender-cvs] [964e319a39a] master: Fix: Alembic import segfault when importing mesh with null UVs
Sybren A. Stüvel
noreply at git.blender.org
Fri Jun 21 11:33:05 CEST 2019
Commit: 964e319a39abfe3808fded71dcacd296401ec04d
Author: Sybren A. Stüvel
Date: Fri Jun 21 11:32:57 2019 +0200
Branches: master
https://developer.blender.org/rB964e319a39abfe3808fded71dcacd296401ec04d
Fix: Alembic import segfault when importing mesh with null UVs
This fixes an issue introduced in 4337bc2e6303dbd5f295878f3e7490995a62713a.
===================================================================
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 9a00140b0fc..de227be0044 100644
--- a/source/blender/alembic/intern/abc_mesh.cc
+++ b/source/blender/alembic/intern/abc_mesh.cc
@@ -830,7 +830,7 @@ static void read_mpolys(CDStreamConfig &config, const AbcMeshData &mesh_data)
const Int32ArraySamplePtr &face_indices = mesh_data.face_indices;
const Int32ArraySamplePtr &face_counts = mesh_data.face_counts;
const V2fArraySamplePtr &uvs = mesh_data.uvs;
- const size_t uvs_size = uvs->size();
+ const size_t uvs_size = uvs == nullptr ? 0 : uvs->size();
const UInt32ArraySamplePtr &uvs_indices = mesh_data.uvs_indices;
const N3fArraySamplePtr &normals = mesh_data.face_normals;
More information about the Bf-blender-cvs
mailing list