mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
LLL: do not crash if import callback is null
This commit is contained in:
parent
37365478c1
commit
ab206b8113
@ -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