fix(query): add check for null ptr.

This commit is contained in:
Haojun Liao 2022-08-05 16:10:45 +08:00
parent 0ac1b85a0e
commit 52173e14e1
1 changed files with 6 additions and 0 deletions

View File

@ -2312,6 +2312,12 @@ void doMergeMultiRows(TSDBROW* pRow, uint64_t uid, SIterInfo* pIter, SArray* pDe
return;
} else { // has next point in mem/imem
TSDBROW* pNextRow = getValidRow(pIter, pDelList, pReader);
if (pNextRow == NULL) {
*pTSRow = current.pTSRow;
*freeTSRow = false;
return;
}
if (TSDBROW_KEY(&current).ts != TSDBROW_KEY(pNextRow).ts) {
*pTSRow = current.pTSRow;
*freeTSRow = false;