From f5496fc9c9b2d64dd9699fd024d8109afbbd7015 Mon Sep 17 00:00:00 2001 From: luboslenco Date: Wed, 30 Jul 2025 13:08:34 +0200 Subject: [PATCH] Fix importing fbx with no uvs --- armorpaint/plugins/io_fbx/io_fbx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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));