fix(query): check null ptr.

This commit is contained in:
Haojun Liao 2024-08-06 14:50:42 +08:00
parent 2f1b353fea
commit 1ea00597f3
1 changed files with 4 additions and 0 deletions

View File

@ -3414,6 +3414,10 @@ static int32_t buildBlockFromBufferSequentially(STsdbReader* pReader, int64_t en
}
STableBlockScanInfo** pBlockScanInfo = pStatus->pTableIter;
if (pBlockScanInfo == NULL || *pBlockScanInfo == NULL) {
return TSDB_CODE_SUCCESS;
}
if (pReader->pIgnoreTables &&
taosHashGet(*pReader->pIgnoreTables, &(*pBlockScanInfo)->uid, sizeof((*pBlockScanInfo)->uid))) {
bool hasNexTable = moveToNextTable(pUidList, pStatus);