[Bf-blender-cvs] [49b068bc639] master: Fix T98847: missing null check in versioning code

Jacques Lucke noreply at git.blender.org
Thu Jun 16 16:23:56 CEST 2022


Commit: 49b068bc639ce5e16a8d700beff2902ed266b74e
Author: Jacques Lucke
Date:   Thu Jun 16 16:23:26 2022 +0200
Branches: master
https://developer.blender.org/rB49b068bc639ce5e16a8d700beff2902ed266b74e

Fix T98847: missing null check in versioning code

It's perfectly legal for `nmd->settings.properties` to be null if
there are no properties.

===================================================================

M	source/blender/blenloader/intern/versioning_300.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 57240b93ab1..97b414d4b4a 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -1001,6 +1001,9 @@ static void do_version_subsurface_methods(bNode *node)
 
 static void version_geometry_nodes_add_attribute_input_settings(NodesModifierData *nmd)
 {
+  if (nmd->settings.properties == NULL) {
+    return;
+  }
   /* Before versioning the properties, make sure it hasn't been done already. */
   LISTBASE_FOREACH (const IDProperty *, property, &nmd->settings.properties->data.group) {
     if (strstr(property->name, "_use_attribute") || strstr(property->name, "_attribute_name")) {



More information about the Bf-blender-cvs mailing list