Fix #106530: Don't try to move unmovable node socket values

Missing checkings for unsupported cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/106545
This commit is contained in:
illua1
2023-04-04 14:23:40 +02:00
committed by Hans Goudey
parent 96c8fcde0f
commit d0604a1bb2

View File

@@ -2477,11 +2477,21 @@ void node_socket_move_default_value(Main &bmain,
}
break;
}
case SOCK_CUSTOM:
case SOCK_SHADER:
case SOCK_GEOMETRY: {
/* Unmovable types. */
return;
}
default: {
break;
}
}
if (dst_values.is_empty() || src_socket_value == nullptr) {
return;
}
for (ID **dst_value : dst_values) {
*dst_value = *src_socket_value;
id_us_plus(*dst_value);