diff --git a/instrumentSolidity.js b/instrumentSolidity.js index de77949..5dd29fc 100644 --- a/instrumentSolidity.js +++ b/instrumentSolidity.js @@ -203,7 +203,9 @@ module.exports = function(contract, fileName, instrumentingActive){ parse["ReturnStatement"] = function(expression, instrument){ if (instrument){instrumentStatement(expression)} - parse[expression.argument.type](expression.argument, instrument); + if (expression.argument){ + parse[expression.argument.type](expression.argument, instrument); + } } parse["NewExpression"] = function(expression, instrument){