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());
         }
     }