Depsgrpah: Fix crash when removing object
This commit is contained in:
@@ -309,6 +309,7 @@ IDDepsNode *Depsgraph::add_id_node(ID *id, bool do_tag, ID *id_cow_hint)
|
|||||||
|
|
||||||
void Depsgraph::clear_id_nodes()
|
void Depsgraph::clear_id_nodes()
|
||||||
{
|
{
|
||||||
|
if (use_copy_on_write) {
|
||||||
/* Stupid workaround to ensure we free IDs in a proper order. */
|
/* Stupid workaround to ensure we free IDs in a proper order. */
|
||||||
GHASH_FOREACH_BEGIN(IDDepsNode *, id_node, id_hash)
|
GHASH_FOREACH_BEGIN(IDDepsNode *, id_node, id_hash)
|
||||||
{
|
{
|
||||||
@@ -327,6 +328,7 @@ void Depsgraph::clear_id_nodes()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
GHASH_FOREACH_END();
|
GHASH_FOREACH_END();
|
||||||
|
}
|
||||||
GHASH_FOREACH_BEGIN(IDDepsNode *, id_node, id_hash)
|
GHASH_FOREACH_BEGIN(IDDepsNode *, id_node, id_hash)
|
||||||
{
|
{
|
||||||
OBJECT_GUARDED_DELETE(id_node, IDDepsNode);
|
OBJECT_GUARDED_DELETE(id_node, IDDepsNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user