diff --git a/src/operator/MetaOperator.cpp b/src/operator/MetaOperator.cpp index 9a8a943fc905fcb43808bf44b96aa32dd055cbd0..96c5b219a35a32fb9574eda1a36a8fa4ee502cc4 100644 --- a/src/operator/MetaOperator.cpp +++ b/src/operator/MetaOperator.cpp @@ -73,6 +73,9 @@ Aidge::MetaOperator_Op::MetaOperator_Op(const MetaOperator_Op& op) std::shared_ptr<Aidge::Operator> Aidge::MetaOperator_Op::clone() const { auto metaOp = std::make_shared<MetaOperator_Op>(*this); if (mImpl) { + // Only setBackend() is mImpl is not nullptr. + // The inner-graph backend is already set in MetaOperator_Op copy + // construtor, when the graph is cloned. metaOp->setBackend(mImpl->backend()); } return metaOp;