commit | 85d624a5101da5ed9b327dba5b8186ab25bcd9dc | [log] [tgz] |
---|---|---|
author | Olli Etuaho <oetuaho@nvidia.com> | Mon Aug 07 13:42:33 2017 +0300 |
committer | Geoff Lang <geofflang@chromium.org> | Wed Aug 09 15:00:58 2017 +0000 |
tree | ff26e7f4a3a619f0c7d05b00b616f504fa5a1f7c | |
parent | 6a6199b4c8ad0029c44fd429fe087fc5c7ef104e [diff] |
Fix null pointer dereference in redeclaration error message When a function parameter name conflicts with another, the pointer returned to ParseContext will be null. BUG=chromium:745242 TEST=angle_unittests Change-Id: Ie53bb06b0c6660e382d85aeda41f3a1b7df5a917 Reviewed-on: https://chromium-review.googlesource.com/603368 Reviewed-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp index 7fa3b0e..a4796e3 100644 --- a/src/compiler/translator/ParseContext.cpp +++ b/src/compiler/translator/ParseContext.cpp
@@ -3005,7 +3005,7 @@ } else { - error(location, "redefinition", variable->getName().c_str()); + error(location, "redefinition", param.name->c_str()); } } }