Nodes: fix link drawing for some socket types
The type of sockets is `-1` in some cases, resulting in a crash when accessing the `std_node_socket_colors` array.
This commit is contained in:
parent
1133b1478e
commit
675a22b341
|
@ -4262,7 +4262,9 @@ void node_draw_link_bezier(const View2D *v2d,
|
|||
}
|
||||
|
||||
if (snode->overlay.flag & SN_OVERLAY_SHOW_OVERLAYS &&
|
||||
snode->overlay.flag & SN_OVERLAY_SHOW_WIRE_COLORS) {
|
||||
snode->overlay.flag & SN_OVERLAY_SHOW_WIRE_COLORS &&
|
||||
((link->fromsock == nullptr || link->fromsock->typeinfo->type >= 0) &&
|
||||
(link->tosock == nullptr || link->tosock->typeinfo->type >= 0))) {
|
||||
if (link->fromsock) {
|
||||
copy_v4_v4(colors[1], std_node_socket_colors[link->fromsock->typeinfo->type]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue