Fix seg fault

Check types before accessing typeName.

Fix #2848.
This commit is contained in:
Jeremy Hayes 2021-12-28 15:17:39 -07:00
parent ca13951205
commit 46466be045
5 changed files with 78 additions and 3 deletions

View file

@ -1321,7 +1321,7 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
// Find it in the symbol table.
//
const TFunction* fnCandidate;
bool builtIn;
bool builtIn {false};
fnCandidate = findFunction(loc, *function, builtIn);
if (fnCandidate) {
// This is a declared function that might map to