commit | 7af63727f0582dd3a5d563c561dd86161e6105a9 | [log] [tgz] |
---|---|---|
author | Olli Etuaho <oetuaho@nvidia.com> | Mon Nov 13 15:03:40 2017 +0200 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Nov 13 14:07:40 2017 +0000 |
tree | fdeda40d0f33acf4386cab78be93451892a23099 | |
parent | c4eca923de1f480a63a0aa1b41ee371258518fa1 [diff] [blame] |
Fix nullptr dereference on struct parameter error Function parameter name string does not necessarily exist, so it's better to use the function name as the token in the error message. BUG=chromium:784158 TEST=angle_unittests Change-Id: I8f3b8604fd702bdc9486b8d721a5f60de1ff3fa7 Reviewed-on: https://chromium-review.googlesource.com/765972 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp index 7b4a742..778d9bf 100644 --- a/src/compiler/translator/ParseContext.cpp +++ b/src/compiler/translator/ParseContext.cpp
@@ -3318,7 +3318,7 @@ { // ESSL 3.00.6 section 12.10. error(location, "Function parameter type cannot be a structure definition", - param.name->c_str()); + function->getName().c_str()); } }