add pointer protection
This commit is contained in:
parent
3e560be2c0
commit
dc47e229d8
|
@ -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);
|
SKeyword** pKey = (SKeyword**)taosHashGet(keywordHashTable, key, n);
|
||||||
return (pKey != NULL)? (*pKey)->type:TK_ID;
|
return (pKey != NULL)? (*pKey)->type:TK_ID;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue