Avoid dereferencing empty optional in ReportingETL

This commit is contained in:
CJ Cobb
2022-02-02 22:20:23 -05:00
committed by manojsdoshi
parent 61389a8bef
commit 5b085a75fd

View File

@@ -929,10 +929,14 @@ ReportingETL::ReportingETL(Application& app)
{ {
auto const optStartSeq = section.get("start_sequence"); auto const optStartSeq = section.get("start_sequence");
if (optStartSeq) if (optStartSeq)
{
// set a value so we can dereference
startSequence_ = 0;
asciiToIntThrows( asciiToIntThrows(
*startSequence_, *startSequence_,
*optStartSeq, *optStartSeq,
"Expected integral start_sequence config entry. Got: "); "Expected integral start_sequence config entry. Got: ");
}
} }
auto const optFlushInterval = section.get("flush_interval"); auto const optFlushInterval = section.get("flush_interval");