Fix: crash when inserting reroute node

This commit is contained in:
Jacques Lucke 2023-01-08 15:19:39 +01:00
parent d8750aa1da
commit 710f8164b4
1 changed files with 1 additions and 1 deletions

View File

@ -1131,7 +1131,7 @@ 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()) {
if (socket_locations.size() != snode.edittree->all_sockets().size()) {
/* Sockets haven't been drawn yet, e.g. when the file is currently opening. */
return nullptr;
}