fix [#26993] Edge Split Crash
[blender-staging.git] / source / blender / modifiers / intern / MOD_edgesplit.c
index c7c2f3edc8abf4b058aa46f2100a537835b8194d..25a8625b34227d8b3df87984770b7dd782fa54dc 100644 (file)
@@ -942,10 +942,13 @@ static void propagate_split(SmoothEdge *edge, SmoothVert *vert,
                                /* vert has more than one fan of faces attached; split it */
                                vert2 = smoothvert_copy(vert, mesh);
 
-                               /* replace vert with its copy in visited_faces */
-                               repdata.find = vert;
-                               repdata.replace = vert2;
-                               BLI_linklist_apply(visited_faces, face_replace_vert, &repdata);
+                               /* fails in rare cases, see [#26993] */
+                               if(vert2) {
+                                       /* replace vert with its copy in visited_faces */
+                                       repdata.find = vert;
+                                       repdata.replace = vert2;
+                                       BLI_linklist_apply(visited_faces, face_replace_vert, &repdata);
+                               }
                        }
                } else {
                        /* edge is not loose, so it must be sharp; split it */