Fix #111180: crash adding AOV/light output node with shader node previews

Only happened when the experimental option is enabled.
This commit is contained in:
Brecht Van Lommel
2023-08-16 16:56:46 +02:00
parent 51fd4af648
commit b0424a7cbd

View File

@@ -711,7 +711,7 @@ static void shader_preview_startjob(void *customdata,
job_data->mat_output_copy->flag |= NODE_DO_OUTPUT;
bNodeSocket *disp_socket = nodeFindSocket(active_user_output_node, SOCK_IN, "Displacement");
if (disp_socket->link != nullptr) {
if (disp_socket != nullptr && disp_socket->link != nullptr) {
job_data->mat_displacement_copy = std::make_pair(disp_socket->link->fromnode,
disp_socket->link->fromsock);
}