mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-09 10:58:06 +02:00
fix crash
This commit is contained in:
parent
28cfe690f7
commit
4f772dcd9d
1 changed files with 6 additions and 1 deletions
|
|
@ -34,9 +34,14 @@ std::string SConfigOptionDescription::jsonify() const {
|
|||
else if (typeid(Config::VEC2) == std::type_index(*CONFIG_VAL.type)) {
|
||||
const auto V = **rc<Config::VEC2* const*>(CONFIG_VAL.dataptr);
|
||||
currentValue = std::format("\"{}, {}\"", V.x, V.y);
|
||||
} else if (typeid(void*) == std::type_index(*CONFIG_VAL.type) || typeid(Config::IComplexConfigValue*) == std::type_index(*CONFIG_VAL.type)) {
|
||||
} else if (typeid(Config::IComplexConfigValue*) == std::type_index(*CONFIG_VAL.type)) {
|
||||
const auto DATA = *rc<Config::IComplexConfigValue* const*>(CONFIG_VAL.dataptr);
|
||||
currentValue = std::format("\"{}\"", DATA->toString());
|
||||
} else if (typeid(void*) == std::type_index(*CONFIG_VAL.type)) {
|
||||
// legacy hyprlang value
|
||||
const auto DATA = *rc<Hyprlang::CConfigCustomValueType* const*>(CONFIG_VAL.dataptr);
|
||||
const auto DATA2 = rc<Config::IComplexConfigValue*>(DATA->getData());
|
||||
currentValue = std::format("\"{}\"", DATA2->toString());
|
||||
}
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue