Fix T80238: Crash adding properties to material node-trees

The localized node-tree was freeing the materials ID properties twice.

This matches how animation data behaves, setting to NULL after freeing.
This commit is contained in:
Campbell Barton 2020-09-08 18:04:03 +10:00 committed by Jeroen Bakker
parent 961bcf9e50
commit 6de33ee656
Notes: blender-bot 2023-02-13 21:21:24 +01:00
Referenced by issue #80238, Crash on Node Tree Custom Property Update function
1 changed files with 2 additions and 0 deletions

View File

@ -56,10 +56,12 @@ void BKE_libblock_free_data(ID *id, const bool do_id_user)
if (id->properties) {
IDP_FreePropertyContent_ex(id->properties, do_id_user);
MEM_freeN(id->properties);
id->properties = NULL;
}
if (id->override_library) {
BKE_lib_override_library_free(&id->override_library, do_id_user);
id->override_library = NULL;
}
BKE_animdata_free(id, do_id_user);