diff --git a/src/integrators/bdpt.h b/src/integrators/bdpt.h index d7024138ed..29cfa8240d 100644 --- a/src/integrators/bdpt.h +++ b/src/integrators/bdpt.h @@ -100,6 +100,7 @@ class ScopedAssignment { ScopedAssignment(const ScopedAssignment &) = delete; ScopedAssignment &operator=(const ScopedAssignment &) = delete; ScopedAssignment &operator=(ScopedAssignment &&other) { + if (target) *target = backup; target = other.target; backup = other.backup; other.target = nullptr;