logging/Manager: Fix coverity null-deref

Prior code assumed non-null stream given the active_write_ctx matches,
but please coverity.
This commit is contained in:
Arne Welzel 2023-12-04 18:15:11 +01:00
parent bc0f85caa8
commit 52fba4aacf

View file

@ -1207,6 +1207,8 @@ ValPtr Manager::Delay(const EnumValPtr& id, const RecordValPtr record, FuncPtr p
ValPtr token_val;
Stream* stream = FindStream(id.get());
if ( ! stream )
return make_intrusive<detail::LogDelayTokenVal>();
if ( const auto& delay_info = stream->GetDelayInfo(active_write_ctx); delay_info ) {
// Previously delayed, return the same token to script-land.