add null pointer check

This commit is contained in:
Ganlin Zhao 2023-06-14 17:00:45 +08:00
parent d5c73f31a6
commit d48e3b3545
1 changed files with 1 additions and 1 deletions

View File

@ -1667,7 +1667,7 @@ static int32_t translateForbidSysTableFunc(STranslateContext* pCxt, SFunctionNod
SSelectStmt* pSelect = (SSelectStmt*)pCxt->pCurrStmt;
SRealTableNode* pTable = (SRealTableNode*)pSelect->pFromTable;
if (TSDB_SYSTEM_TABLE == pTable->pMeta->tableType) {
if (NULL != pTable && TSDB_SYSTEM_TABLE == pTable->pMeta->tableType) {
return generateSyntaxErrMsg(&pCxt->msgBuf, TSDB_CODE_PAR_SYSTABLE_NOT_ALLOWED_FUNC, pFunc->functionName);
}
return TSDB_CODE_SUCCESS;