Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-21 17:24:56 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-06-21 19:00:48 +0300
commit19488ee125734c616559a6ad94369bc28feddc7e (patch)
treeb8c7cae0e0691b31452e79d89f66dd5c0aa7725e /intern/cycles/graph
parenta887e1ea436f14762d9b768ba2d394b7afab4ee9 (diff)
Fix (harmless) Cycles ASAN warnings
Diffstat (limited to 'intern/cycles/graph')
-rw-r--r--intern/cycles/graph/node.cpp4
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>