diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index f1349d7d414b58be31f0d56165231acc1459b313..c6614d0054301899cfc020a24ced617347f9ca0b 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -902,7 +902,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) { tscTrace("0x%"PRIx64" start to parse the %dth subclause, total:%"PRIzu, pSql->self, i, size); - if (size > 1 && pSqlNode->from->type == SQL_NODE_FROM_SUBQUERY) { + if (size > 1 && pSqlNode->from && pSqlNode->from->type == SQL_NODE_FROM_SUBQUERY) { return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg1); }