diff options
-rw-r--r-- | src/config/ConfigManager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 3429db24..ba0fdd9d 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -67,7 +67,10 @@ static Hyprlang::CParseResult configHandleGradientSet(const char* VALUE, void** } try { - DATA->m_vColors.push_back(CColor(*configStringToInt(var))); + const auto COL = configStringToInt(var); + if (!COL) + throw std::runtime_error(std::format("failed to parse {} as a color", var)); + DATA->m_vColors.push_back(CColor(COL.value())); } catch (std::exception& e) { Debug::log(WARN, "Error parsing gradient {}", V); parseError = "Error parsing gradient " + V + ": " + e.what(); |