Fix T64210: crash using Live Unwrap without UVMap
authorPhilipp Oeser <info@graphics-engineer.com>
Tue, 7 May 2019 08:09:22 +0000 (10:09 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Tue, 7 May 2019 09:23:17 +0000 (11:23 +0200)
Reviewers: brecht

Maniphest Tasks: T64210

Differential Revision: https://developer.blender.org/D4817

source/blender/editors/uvedit/uvedit_unwrap_ops.c

index 853939258020a50667685670600abcd73597b028..717bc347cf786a0fe2697caadafc7545e7a599e2 100644 (file)
@@ -386,6 +386,10 @@ static ParamHandle *construct_param_handle_multi(Scene *scene,
 
     const int cd_loop_uv_offset = CustomData_get_offset(&bm->ldata, CD_MLOOPUV);
 
+    if (cd_loop_uv_offset == -1) {
+      continue;
+    }
+
     BM_ITER_MESH_INDEX (efa, &iter, bm, BM_FACES_OF_MESH, i) {
 
       if ((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) ||