fix(query): add null ptr check.

This commit is contained in:
Haojun Liao 2023-04-23 13:53:55 +08:00
parent b6f4cac619
commit 6fc364db19
1 changed files with 4 additions and 0 deletions

View File

@ -88,6 +88,10 @@ void getLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo, int64_t *blocks, double
}
void *destroyLastBlockLoadInfo(SSttBlockLoadInfo *pLoadInfo) {
if (pLoadInfo == NULL) {
return NULL;
}
for (int32_t i = 0; i < pLoadInfo->numOfStt; ++i) {
pLoadInfo[i].currentLoadBlockIndex = 1;
pLoadInfo[i].blockIndex[0] = -1;