diff --git a/common/DetectorSettings.cpp b/common/DetectorSettings.cpp index a0a7e536..24aae992 100644 --- a/common/DetectorSettings.cpp +++ b/common/DetectorSettings.cpp @@ -163,8 +163,10 @@ std::optional DetectorSettings::GetEigerThreshold_keV() const { } DetectorSettings &DetectorSettings::EigerThreshold_keV(const std::optional &input) { - check_min("EIGER Threshold (keV)", input, 1.0); - check_max("EIGER Threshold (keV)", input, 100.0); + if (input.has_value()) { + check_min("EIGER Threshold (keV)", input.value(), 1.0); + check_max("EIGER Threshold (keV)", input.value(), 100.0); + } eiger_threshold_keV = input; return *this; }