logging/Manager: Fix slot logic

This commit is contained in:
Arne Welzel 2025-09-28 19:09:48 +02:00
parent f17ca010bc
commit 7ae53aea04

View file

@ -1654,14 +1654,16 @@ detail::LogRecord Manager::RecordToLogRecord(WriterInfo* info, Filter* filter, c
for ( int index : indices ) { for ( int index : indices ) {
auto vr = val->AsRecord(); auto vr = val->AsRecord();
val = vr->RawOptField(index); const auto& slot = vr->RawOptField(index);
if ( ! val ) { if ( ! slot.IsSet() ) {
// Value, or any of its parents, is not set. // Value, or any of its parents, is not set.
vals.emplace_back(filter->fields[i]->type, false); vals.emplace_back(filter->fields[i]->type, false);
val = std::nullopt;
break; break;
} }
val = *slot;
vt = cast_intrusive<RecordType>(vr->GetType())->GetFieldType(index).get(); vt = cast_intrusive<RecordType>(vr->GetType())->GetFieldType(index).get();
} }