fix(query): add null pointer check.
This commit is contained in:
parent
102fdf2916
commit
75e0eaa53f
|
@ -204,6 +204,11 @@ static int32_t sortComparInit(SMsortComparParam* cmpParam, SArray* pSources, int
|
|||
if (pHandle->type == SORT_SINGLESOURCE_SORT) {
|
||||
for (int32_t i = 0; i < cmpParam->numOfSources; ++i) {
|
||||
SSortSource* pSource = cmpParam->pSources[i];
|
||||
|
||||
if (taosArrayGetSize(pSource->pageIdList) == 0) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
SPageInfo* pPgInfo = *(SPageInfo**)taosArrayGet(pSource->pageIdList, pSource->pageIndex);
|
||||
|
||||
void* pPage = getBufPage(pHandle->pBuf, getPageId(pPgInfo));
|
||||
|
|
Loading…
Reference in New Issue