mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-07 09:18:09 +02:00
config/legacy: fix crash on getConfigValue of plugin fns
This commit is contained in:
parent
33044c3816
commit
2824ffdda0
1 changed files with 9 additions and 0 deletions
|
|
@ -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 {};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue