summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-12-03 22:43:21 +0000
committerVaxry <vaxry@vaxry.net>2025-12-03 22:43:26 +0000
commit9b1891e4765e2c5b84c8c61725e3973ca9940e05 (patch)
tree3c298a97929527c2e4a3ea86ab47901398a30569 /src
parent93e5e92b0ae7809ee0f64d94d51e210c476ee823 (diff)
desktop/overridableVar: fix possible crash
Diffstat (limited to 'src')
-rw-r--r--src/desktop/types/OverridableVar.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/desktop/types/OverridableVar.hpp b/src/desktop/types/OverridableVar.hpp
index 538346c7..cdf27b89 100644
--- a/src/desktop/types/OverridableVar.hpp
+++ b/src/desktop/types/OverridableVar.hpp
@@ -61,7 +61,7 @@ namespace Desktop::Types {
for (size_t i = 0; i < PRIORITY_END; ++i) {
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
m_values[i] = other.m_values[i];
}