fix an issue that NodeRootSelectLambda violates assetion

This commit is contained in:
falsycat 2022-09-02 17:42:18 +09:00
parent a5f3e459bf
commit d6a9c62a63

View File

@ -1,5 +1,6 @@
#pragma once
#include <cassert>
#include <functional>
#include <memory>
#include <mutex>
@ -38,7 +39,7 @@ class NodeRootSelectLambda : public nf7::Node::Lambda,
const auto ks = std::string {k};
if (names_.contains(ks)) {
names_.clear();
auto pro = std::move(*pro_);
auto pro = *std::exchange(pro_, std::nullopt);
lk.unlock();
pro.Return({ks, v});
} else {