Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-10-25 14:29:42 +0300
committerJacques Lucke <jacques@blender.org>2021-10-25 14:30:00 +0300
commit60e2103507b2d89a64771e969294272dd23b83e6 (patch)
tree287a81726926ccf0b9daa33b3774f4f4b57920f7 /source/blender/blenloader/intern/versioning_300.c
parent5c2330203e11e0d916960218b07d88d2193bf526 (diff)
Fix: crash in previously added versioning code
Diffstat (limited to 'source/blender/blenloader/intern/versioning_300.c')
-rw-r--r--source/blender/blenloader/intern/versioning_300.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index f0bc910889b..7341797bb65 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -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. */