add pointer protection

This commit is contained in:
dapan1121 2021-06-09 16:00:37 +08:00
parent 3e560be2c0
commit dc47e229d8
1 changed files with 4 additions and 0 deletions

View File

@ -275,6 +275,10 @@ static int32_t tKeywordCode(const char* z, int n) {
}
}
if (keywordHashTable == NULL) {
return TK_ILLEGAL;
}
SKeyword** pKey = (SKeyword**)taosHashGet(keywordHashTable, key, n);
return (pKey != NULL)? (*pKey)->type:TK_ID;
}