[Bf-blender-cvs] [2d5e38d4ece] master: Cycles: fix incorrect default value for node array socket type
Kévin Dietrich
noreply at git.blender.org
Fri Oct 9 00:15:34 CEST 2020
Commit: 2d5e38d4ece9074ac3ad550a130658e8a29fdac6
Author: Kévin Dietrich
Date: Fri Oct 9 00:11:45 2020 +0200
Branches: master
https://developer.blender.org/rB2d5e38d4ece9074ac3ad550a130658e8a29fdac6
Cycles: fix incorrect default value for node array socket type
===================================================================
M intern/cycles/graph/node_type.h
===================================================================
diff --git a/intern/cycles/graph/node_type.h b/intern/cycles/graph/node_type.h
index 69891e6a10a..3b9b3007099 100644
--- a/intern/cycles/graph/node_type.h
+++ b/intern/cycles/graph/node_type.h
@@ -267,8 +267,8 @@ struct NodeType {
##__VA_ARGS__)
#define SOCKET_NODE_ARRAY(name, ui_name, node_type, ...) \
{ \
- static Node *defval = NULL; \
- assert(SOCKET_SIZEOF(T, name) == sizeof(Node *)); \
+ static array<Node *> defval = {}; \
+ assert(SOCKET_SIZEOF(T, name) == sizeof(array<Node *>)); \
type->register_input(ustring(#name), \
ustring(ui_name), \
SocketType::NODE_ARRAY, \
More information about the Bf-blender-cvs
mailing list