diff --git a/lib/Runtime/Language/AsmJs.cpp b/lib/Runtime/Language/AsmJs.cpp index a046929c833..5516a491009 100644 --- a/lib/Runtime/Language/AsmJs.cpp +++ b/lib/Runtime/Language/AsmJs.cpp @@ -965,6 +965,10 @@ namespace Js } ParseNode* objectElement = ParserWrapper::GetUnaryNode(objNode); + if (!objectElement) + { + return m.Fail(node, _u("Return object must not be empty")); + } while( objectElement ) { ParseNode* member = nullptr;