Skip to content
Snippets Groups Projects
Commit 6ef362c3 authored by Franck Dary's avatar Franck Dary
Browse files

corrected bug where apply was processed when there was nothing to produce

parent fc0a942e
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,9 @@ Producer::Producer(std::filesystem::path input, std::filesystem::path output) :
// Returns false if we are finished and true if we have events remaining.
bool Producer::apply(BaseConfig & config)
{
if (not parser.hasNext())
return false;
auto text = util::splitAsUtf8(parser.getCurrentNodeText());
if (text.empty())
util::error("Trying to add empty text to raw input.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment