Only check for config menu if the plugin is linked and loaded

This commit is contained in:
Maschell 2024-08-04 15:41:10 +02:00
parent 9c8177405e
commit 39256e45f0

View File

@ -83,6 +83,7 @@ void ConfigUtils::displayMenu() {
info.pluginData = plugin.getPluginDataCopy();
std::unique_ptr<WUPSConfigAPIBackend::WUPSConfig> config;
if (plugin.isLinkedAndLoaded()) {
const auto configData = plugin.getConfigData();
if (configData) {
const auto configHandleOpt = configData->createConfig();
@ -120,6 +121,7 @@ void ConfigUtils::displayMenu() {
}
}
}
}
if (!config) {
config = make_unique_nothrow<WUPSConfigAPIBackend::WUPSConfig>(info.name);
}