Lv2Proc: Fix shutdown routine (#6944)
This commit is contained in:
committed by
Johannes Lorenz
parent
c779521730
commit
379acb970b
@@ -84,6 +84,8 @@ public:
|
||||
return m_options.data();
|
||||
}
|
||||
|
||||
void clear();
|
||||
|
||||
private:
|
||||
//! Initialize an option internally
|
||||
void initOption(LV2_URID key,
|
||||
|
||||
@@ -175,7 +175,7 @@ private:
|
||||
bool m_valid = true;
|
||||
|
||||
const LilvPlugin* m_plugin;
|
||||
LilvInstance* m_instance;
|
||||
LilvInstance* m_instance = nullptr;
|
||||
Lv2Features m_features;
|
||||
|
||||
// options
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -477,6 +477,7 @@ void Lv2Proc::shutdownPlugin()
|
||||
m_instance = nullptr;
|
||||
|
||||
m_features.clear();
|
||||
m_options.clear();
|
||||
}
|
||||
m_valid = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user