Lv2Proc: Fix shutdown routine (#6944)

This commit is contained in:
Johannes Lorenz
2023-10-21 17:04:05 +02:00
committed by Johannes Lorenz
parent c779521730
commit 379acb970b
5 changed files with 20 additions and 2 deletions

View File

@@ -109,7 +109,12 @@ void *&Lv2Features::operator[](const char *featName)
void Lv2Features::clear()
{
m_featureByUri.clear();
m_features.clear();
for (auto& [uri, feature] : m_featureByUri)
{
(void) uri;
feature = nullptr;
}
}

View File

@@ -94,6 +94,16 @@ void Lv2Options::initOption(LV2_URID key, uint32_t size, LV2_URID type,
}
void Lv2Options::clear()
{
m_options.clear();
m_optionValues.clear();
m_optionByUrid.clear();
}
} // namespace lmms
#endif // LMMS_HAVE_LV2

View File

@@ -477,6 +477,7 @@ void Lv2Proc::shutdownPlugin()
m_instance = nullptr;
m_features.clear();
m_options.clear();
}
m_valid = true;
}