mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 07:10:02 +01:00
desktop/overridableVar: fix possible crash
This commit is contained in:
parent
93e5e92b0a
commit
9b1891e476
1 changed files with 1 additions and 1 deletions
|
|
@ -61,7 +61,7 @@ namespace Desktop::Types {
|
||||||
|
|
||||||
for (size_t i = 0; i < PRIORITY_END; ++i) {
|
for (size_t i = 0; i < PRIORITY_END; ++i) {
|
||||||
if constexpr (Extended && !std::is_same_v<T, bool>)
|
if constexpr (Extended && !std::is_same_v<T, bool>)
|
||||||
m_values[i] = clampOptional(*other.m_values[i], m_minValue, m_maxValue);
|
m_values[i] = other.m_values[i].has_value() ? clampOptional(*other.m_values[i], m_minValue, m_maxValue) : other.m_values[i];
|
||||||
else
|
else
|
||||||
m_values[i] = other.m_values[i];
|
m_values[i] = other.m_values[i];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue