fix an issue that could refer an object already destructed

This commit is contained in:
falsycat 2022-11-24 13:21:19 +09:00
parent a08a02d71c
commit fce36b2c8f

View File

@ -41,9 +41,9 @@ class NodeRootLambda : public nf7::Node::Lambda,
if (names_.contains(in.name)) {
names_.clear();
auto pro = *std::exchange(pro_, std::nullopt);
auto pro = std::exchange(pro_, std::nullopt);
lk.unlock();
pro.Return({in.name, in.value});
pro->Return({in.name, in.value});
} else {
q_.push_back({in.name, in.value});
}