diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-03-15 18:11:12 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-03-15 18:47:07 +0300 |
commit | cd3fade2aaf74d1c3db345c13bd0122dc45d372f (patch) | |
tree | a87fb96829eecd8c7f138539ef26a196b1ab947a /intern/cycles/graph/node_xml.cpp | |
parent | 3fdef12162f68a7f89a6f868f927fe8755c7bd20 (diff) |
Fix Cycles rendering crash on OpenBSD
Static initialization order was not guaranteed to be correct for node base
types. Now wrap all initialization in accessor functions to ensure the order
is correct.
Did not cause any known bug on Linux/macOS/Windows, but showed up on this
platform.
Diffstat (limited to 'intern/cycles/graph/node_xml.cpp')
-rw-r--r-- | intern/cycles/graph/node_xml.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/graph/node_xml.cpp b/intern/cycles/graph/node_xml.cpp index d333400cc4a..43462662b6a 100644 --- a/intern/cycles/graph/node_xml.cpp +++ b/intern/cycles/graph/node_xml.cpp @@ -200,7 +200,7 @@ void xml_read_node(XMLReader &reader, Node *node, xml_node xml_node) map<ustring, Node *>::iterator it = reader.node_map.find(value); if (it != reader.node_map.end()) { Node *value_node = it->second; - if (value_node->is_a(*(socket.node_type))) + if (value_node->is_a(socket.node_type)) node->set(socket, it->second); } break; @@ -215,7 +215,7 @@ void xml_read_node(XMLReader &reader, Node *node, xml_node xml_node) map<ustring, Node *>::iterator it = reader.node_map.find(ustring(tokens[i])); if (it != reader.node_map.end()) { Node *value_node = it->second; - value[i] = (value_node->is_a(*(socket.node_type))) ? value_node : NULL; + value[i] = (value_node->is_a(socket.node_type)) ? value_node : NULL; } else { value[i] = NULL; |