mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #3012 from ethereum/lll-includes
LLL: do not crash if import callback is null
This commit is contained in:
commit
9e101db45f
@ -224,6 +224,8 @@ void CodeFragment::constructOperation(sp::utree const& _t, CompilerState& _s)
|
||||
string fileName = firstAsString();
|
||||
if (fileName.empty())
|
||||
error<InvalidName>("Empty file name provided");
|
||||
if (!m_readFile)
|
||||
error<InvalidName>("Import callback not present");
|
||||
string contents = m_readFile(fileName);
|
||||
if (contents.empty())
|
||||
error<InvalidName>(std::string("File not found (or empty): ") + fileName);
|
||||
|
Loading…
Reference in New Issue
Block a user