Fix: crash when opening file with visible node editor
Caused by rB87fd798ae383a344d51dcbd9f66d5834595bdc5a.
This commit is contained in:
parent
2895c67086
commit
e22247a965
Notes:
blender-bot
2023-02-14 06:00:45 +01:00
Referenced by issue #103715, Regression: Node Editor: Debug assert if cursor over node editor area when blender start
|
@ -1131,6 +1131,10 @@ bNodeSocket *node_find_indicated_socket(SpaceNode &snode,
|
|||
|
||||
snode.edittree->ensure_topology_cache();
|
||||
const Span<float2> socket_locations = snode.runtime->all_socket_locations;
|
||||
if (socket_locations.is_empty()) {
|
||||
/* Sockets haven't been drawn yet, e.g. when the file is currently opening. */
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const Span<bNode *> nodes = snode.edittree->all_nodes();
|
||||
for (int i = nodes.index_range().last(); i >= 0; i--) {
|
||||
|
|
Loading…
Reference in New Issue