diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-21 17:24:56 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-06-21 19:00:48 +0300 |
commit | 19488ee125734c616559a6ad94369bc28feddc7e (patch) | |
tree | b8c7cae0e0691b31452e79d89f66dd5c0aa7725e /intern/cycles/graph | |
parent | a887e1ea436f14762d9b768ba2d394b7afab4ee9 (diff) |
Fix (harmless) Cycles ASAN warnings
Diffstat (limited to 'intern/cycles/graph')
-rw-r--r-- | intern/cycles/graph/node.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp index fc7daaeeaa6..4f79a7518dc 100644 --- a/intern/cycles/graph/node.cpp +++ b/intern/cycles/graph/node.cpp @@ -313,7 +313,9 @@ void Node::set_default_value(const SocketType &socket) { const void *src = socket.default_value; void *dst = ((char *)this) + socket.struct_offset; - memcpy(dst, src, socket.size()); + if (socket.size() > 0) { + memcpy(dst, src, socket.size()); + } } template<typename T> |