fix(query): add null pointer check.

This commit is contained in:
Haojun Liao 2022-07-16 19:54:14 +08:00
parent 5a5e30c456
commit 6756c6515a
1 changed files with 4 additions and 0 deletions

View File

@ -109,6 +109,10 @@ static int32_t sortComparClearup(SMsortComparParam* cmpParam) {
}
void tsortDestroySortHandle(SSortHandle* pSortHandle) {
if (pSortHandle == NULL) {
return;
}
tsortClose(pSortHandle);
if (pSortHandle->pMergeTree != NULL) {
tMergeTreeDestroy(pSortHandle->pMergeTree);