diff --git a/armorpaint/plugins/io_fbx/io_fbx.c b/armorpaint/plugins/io_fbx/io_fbx.c index 0e84f394..a55bbd3f 100644 --- a/armorpaint/plugins/io_fbx/io_fbx.c +++ b/armorpaint/plugins/io_fbx/io_fbx.c @@ -131,9 +131,11 @@ void io_fbx_parse_mesh(raw_mesh_t *raw, ufbx_mesh *mesh, ufbx_matrix *to_world, raw->nora->buffer = nora; raw->nora->length = raw->nora->capacity = vertex_count * 2; - raw->texa = (i16_array_t *)malloc(sizeof(i16_array_t)); - raw->texa->buffer = texa; - raw->texa->length = raw->texa->capacity = vertex_count * 2; + if (texa != NULL) { + raw->texa = (i16_array_t *)malloc(sizeof(i16_array_t)); + raw->texa->buffer = texa; + raw->texa->length = raw->texa->capacity = vertex_count * 2; + } if (cola != NULL) { raw->cola = (i16_array_t *)malloc(sizeof(i16_array_t));