treat empty container as init exception

This commit is contained in:
v4hn 2020-03-26 16:25:22 +01:00
parent 87d70a5da1
commit 5ae7e54732

View File

@ -512,7 +512,7 @@ void SerialContainerPrivate::storeRequiredInterface(container_type::const_iterat
// called by parent asking for pruning of this' interface
void SerialContainerPrivate::pruneInterface(InterfaceFlags accepted) {
if (children().empty())
return;
throw InitStageException(*me(), "container is empty");
// reading is always allowed if current interface flags do so
accepted |= (interfaceFlags() & InterfaceFlags({ READS_START, READS_END }));