diff options
-rw-r--r-- | solc/jsonCompiler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/solc/jsonCompiler.cpp b/solc/jsonCompiler.cpp index b465d8db..accbc13c 100644 --- a/solc/jsonCompiler.cpp +++ b/solc/jsonCompiler.cpp @@ -70,8 +70,10 @@ Json::Value estimateGas(CompilerStack const& _compiler, string const& _contract) creation[1] = estimates["creation"]["codeDepositCost"]; output["creation"] = creation; } - output["external"] = estimates["external"]; - output["internal"] = estimates["internal"]; + else + output["creation"] = Json::objectValue; + output["external"] = estimates.get("external", Json::objectValue); + output["internal"] = estimates.get("internal", Json::objectValue); return output; } |