Commit: b024577452f5760b73d2c510cebcfe5459e81bf0
Author: Jacques Lucke
Date:   Fri Dec 23 13:16:42 2022 +0100
Branches: master
https://developer.blender.org/rBb024577452f5760b73d2c510cebcfe5459e81bf0

Fix: dangling attribute name pointer

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

M       source/blender/editors/object/object_modifier.cc

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

diff --git a/source/blender/editors/object/object_modifier.cc 
b/source/blender/editors/object/object_modifier.cc
index 3a98108989e..523be5eda13 100644
--- a/source/blender/editors/object/object_modifier.cc
+++ b/source/blender/editors/object/object_modifier.cc
@@ -867,7 +867,7 @@ static void remove_invalid_attribute_strings(Mesh &mesh)
         mesh.active_color_attribute);
     if (!meta_data || !(meta_data->domain & ATTR_DOMAIN_MASK_COLOR) ||
         !(meta_data->data_type & CD_MASK_COLOR_ALL)) {
-      MEM_freeN(mesh.active_color_attribute);
+      MEM_SAFE_FREE(mesh.active_color_attribute);
     }
   }
   if (mesh.default_color_attribute) {
@@ -875,7 +875,7 @@ static void remove_invalid_attribute_strings(Mesh &mesh)
         mesh.default_color_attribute);
     if (!meta_data || !(meta_data->domain & ATTR_DOMAIN_MASK_COLOR) ||
         !(meta_data->data_type & CD_MASK_COLOR_ALL)) {
-      MEM_freeN(mesh.default_color_attribute);
+      MEM_SAFE_FREE(mesh.default_color_attribute);
     }
   }
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to