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:
-rw-r--r--intern/cycles/bvh/bvh_params.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/bvh/bvh_params.h b/intern/cycles/bvh/bvh_params.h
index 99bfd9449da..af8d8eeb3ee 100644
--- a/intern/cycles/bvh/bvh_params.h
+++ b/intern/cycles/bvh/bvh_params.h
@@ -113,7 +113,9 @@ public:
__forceinline int prim_type() const { return type; }
BVHReference& operator=(const BVHReference &arg) {
- memcpy(this, &arg, sizeof(BVHReference));
+ if(&arg != this) {
+ memcpy(this, &arg, sizeof(BVHReference));
+ }
return *this;
}