diff --git a/liblll/CodeFragment.cpp b/liblll/CodeFragment.cpp index 49c480277..d4ef38883 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("Empty file name provided"); + if (!m_readFile) + error("Import callback not present"); string contents = m_readFile(fileName); if (contents.empty()) error(std::string("File not found (or empty): ") + fileName);