diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-03 17:22:30 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-10-03 17:22:30 +0800 |
commit | ab206b8113c8127f8750e1fb1a541bf20950f225 (patch) | |
tree | 56e3c719ecfc9531496c528b20703781aa85f498 /liblll | |
parent | 37365478c19b1227261ba4246b4d2f06ef7bb522 (diff) | |
download | dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.gz dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.bz2 dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.lz dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.xz dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.tar.zst dexon-solidity-ab206b8113c8127f8750e1fb1a541bf20950f225.zip |
LLL: do not crash if import callback is null
Diffstat (limited to 'liblll')
-rw-r--r-- | liblll/CodeFragment.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 49c48027..d4ef3888 100644 --- a/liblll/CodeFragment.cpp +++ b/liblll/CodeFragment.cpp @@ -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); |