diff --git a/source/libs/parser/src/parAstCreater.c b/source/libs/parser/src/parAstCreater.c index 37a68f1bf3..e0b135b4f9 100644 --- a/source/libs/parser/src/parAstCreater.c +++ b/source/libs/parser/src/parAstCreater.c @@ -1553,6 +1553,9 @@ SNode* createShowStmt(SAstCreateContext* pCxt, ENodeType type) { } SNode* setShowKind(SAstCreateContext* pCxt, SNode* pStmt, EShowKind showKind) { + if (pStmt == NULL) { + return NULL; + } SShowStmt* pShow = (SShowStmt*)pStmt; pShow->showKind = showKind; return pStmt;