From 82ac391803224794fe337485d82300189c6499f2 Mon Sep 17 00:00:00 2001 From: cgewecke Date: Wed, 14 Dec 2016 14:53:18 -0800 Subject: [PATCH] Check for null argument in returnStatement parsing --- instrumentSolidity.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instrumentSolidity.js b/instrumentSolidity.js index 506edb7..ff3d1d9 100644 --- a/instrumentSolidity.js +++ b/instrumentSolidity.js @@ -204,7 +204,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){