[wpiutil] ProtobufMessageDatabase: Clear messages first (#5827)

The message destructor appears to call something on the descriptor.
This commit is contained in:
Peter Johnson
2023-10-26 19:17:29 -07:00
committed by GitHub
parent 98c14f1692
commit 2ab4fcbc24

View File

@@ -18,8 +18,8 @@ bool ProtobufMessageDatabase::Add(std::string_view filename,
if (file.complete) {
file.complete = false;
m_factory.reset();
m_msgs.clear();
m_factory.reset();
// rebuild the pool EXCEPT for this descriptor
m_pool = std::make_unique<google::protobuf::DescriptorPool>();