diff options
| author | Vaxry <vaxry@vaxry.net> | 2026-05-04 16:17:48 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2026-05-04 16:17:48 +0100 |
| commit | 2824ffdda04d8471cd8a4ff30641ea06e4d80cf5 (patch) | |
| tree | ff785bd759d4ce94dccacf81d93aab73676fb39e /src/config | |
| parent | 33044c3816ce99db849aa50a9c97353056535968 (diff) | |
config/legacy: fix crash on getConfigValue of plugin fns
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/legacy/ConfigManager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/config/legacy/ConfigManager.cpp b/src/config/legacy/ConfigManager.cpp index 1b18b4a7..37b819e3 100644 --- a/src/config/legacy/ConfigManager.cpp +++ b/src/config/legacy/ConfigManager.cpp @@ -1155,6 +1155,15 @@ std::string CConfigManager::getDeviceString(const std::string& dev, const std::s } SConfigOptionReply CConfigManager::getConfigValue(const std::string& val) { + if (val.starts_with("plugin:")) { + const auto VAL = m_config->getSpecialConfigValuePtr("plugin", val.substr(7).c_str(), nullptr); + + if (!VAL) + return {}; + + return {.dataptr = VAL->getDataStaticPtr(), .type = &VAL->getValue().type(), .setByUser = VAL->m_bSetByUser}; + } + const auto VAL = m_config->getConfigValuePtr(val.c_str()); if (!VAL) return {}; |
