Commit: cfb50463bef8a5c91daaa48cb0e84c4f6bb65ea7
Author: Sergey Sharybin
Date: Tue Jun 26 10:47:35 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBcfb50463bef8a5c91daaa48cb0e84c4f6bb65ea7
Free crash when freeing object caches from duplicator
===================================================================
M source/blender/blenkernel/intern/object.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object.c
b/source/blender/blenkernel/intern/object.c
index 773b191111a..f31aa36de5f 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -404,8 +404,15 @@ void BKE_object_free_caches(Object *object)
}
}
- BKE_object_free_derived_caches(object);
- update_flag |= OB_RECALC_DATA;
+ /* NOTE: If object ios copming from a duplicator, it might be a
temporary
+ * object created by dependency graph, which shares pointers with
original
+ * object.
+ * In this case we can not free anything.
+ */
+ if ((object->base_flag & BASE_FROMDUPLI) == 0) {
+ BKE_object_free_derived_caches(object);
+ update_flag |= OB_RECALC_DATA;
+ }
/* Tag object for update, so once memory critical operation is over and
* scene update routines are back to it's business the object will be
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs