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 490a42f592
commit 14dc426b45

View file

@ -234,7 +234,7 @@ func (pts *packedTimeseries) Unpack(tbf *tmpBlocksFile, dst *Result, tr storage.
} }
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)
} }
} }