summaryrefslogtreecommitdiffstats
path: root/js/src/frontend/NameFunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/frontend/NameFunctions.cpp')
-rw-r--r--js/src/frontend/NameFunctions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/src/frontend/NameFunctions.cpp b/js/src/frontend/NameFunctions.cpp
index 376be7624..db70bb5b4 100644
--- a/js/src/frontend/NameFunctions.cpp
+++ b/js/src/frontend/NameFunctions.cpp
@@ -651,8 +651,10 @@ class NameResolver
// contain arbitrary expressions.
case PNK_CATCH:
MOZ_ASSERT(cur->isArity(PN_TERNARY));
- if (!resolve(cur->pn_kid1, prefix))
- return false;
+ if (cur->pn_kid1) {
+ if (!resolve(cur->pn_kid1, prefix))
+ return false;
+ }
if (cur->pn_kid2) {
if (!resolve(cur->pn_kid2, prefix))
return false;