fix for subtle bug due to GetField now potentially returning a new ValPtr

This commit is contained in:
Vern Paxson 2021-02-25 12:45:34 -08:00
parent 3f6f8e0709
commit bc4a6c0d07

View file

@ -1095,9 +1095,12 @@ threading::Value** Manager::RecordToFilterVals(Stream* stream, Filter* filter,
// potentially be nested inside other records. // potentially be nested inside other records.
list<int>& indices = filter->indices[i]; list<int>& indices = filter->indices[i];
ValPtr val_ptr;
for ( list<int>::iterator j = indices.begin(); j != indices.end(); ++j ) for ( list<int>::iterator j = indices.begin(); j != indices.end(); ++j )
{ {
val = val->AsRecordVal()->GetField(*j).get(); val_ptr = val->AsRecordVal()->GetField(*j);
val = val_ptr.get();
if ( ! val ) if ( ! val )
{ {