forked from bartvdbraak/blender
Cycles: Avoid memcpy of intersecting memory
Could happen when assignment happens to self during sorting.
This commit is contained in:
parent
8ff4c53e63
commit
919a665497
@ -113,7 +113,9 @@ public:
|
|||||||
__forceinline int prim_type() const { return type; }
|
__forceinline int prim_type() const { return type; }
|
||||||
|
|
||||||
BVHReference& operator=(const BVHReference &arg) {
|
BVHReference& operator=(const BVHReference &arg) {
|
||||||
memcpy(this, &arg, sizeof(BVHReference));
|
if(&arg != this) {
|
||||||
|
memcpy(this, &arg, sizeof(BVHReference));
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user