Fix: crash in previously added versioning code

This commit is contained in:
Jacques Lucke
2021-10-25 13:29:42 +02:00
parent 5c2330203e
commit 60e2103507

View File

@@ -1225,6 +1225,10 @@ static void version_geometry_nodes_set_position_node_offset(bNodeTree *ntree)
if (node->type != GEO_NODE_SET_POSITION) {
continue;
}
if (BLI_listbase_count(&node->inputs) < 4) {
/* The offset socket didn't exist in the file yet. */
return;
}
bNodeSocket *old_offset_socket = BLI_findlink(&node->inputs, 3);
if (old_offset_socket->type == SOCK_VECTOR) {
/* Versioning happened already. */