Fix #111381: Crash when inserting a node onto a link inside a frame

`discover_tree_zones` requires the node topology cache, make sure it is available before calling.

Pull Request: https://projects.blender.org/blender/blender/pulls/111383
This commit is contained in:
Lukas Tönne
2023-08-23 08:51:05 +02:00
parent 0f0a2d9038
commit 26e2f07dad

View File

@@ -334,6 +334,7 @@ static std::unique_ptr<bNodeTreeZones> discover_tree_zones(const bNodeTree &tree
const bNodeTreeZones *get_tree_zones(const bNodeTree &tree)
{
tree.ensure_topology_cache();
tree.runtime->tree_zones_cache_mutex.ensure(
[&]() { tree.runtime->tree_zones = discover_tree_zones(tree); });
return tree.runtime->tree_zones.get();