app/vmselect: fix nil pointer dereference panic when unsuccessfully querying vmstorage

This commit is contained in:
Aliaksandr Valialkin 2020-07-16 19:14:49 +03:00
parent ef6ee72108
commit e4e1cd1de2

View file

@ -227,7 +227,7 @@ func (pts *packedTimeseries) Unpack(dst *Result, tr storage.TimeRange, fetchData
} }
if firstErr == nil { if firstErr == nil {
sbs = append(sbs, upw.sb) sbs = append(sbs, upw.sb)
} else { } else if upw.sb != nil {
putSortBlock(upw.sb) putSortBlock(upw.sb)
} }
} }