From 5ae7e54732b8727c5f72a5873f9735b9fce9ba61 Mon Sep 17 00:00:00 2001 From: v4hn Date: Thu, 26 Mar 2020 16:25:22 +0100 Subject: [PATCH] treat empty container as init exception --- core/src/container.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/container.cpp b/core/src/container.cpp index a7a80e7d..b4acd63e 100644 --- a/core/src/container.cpp +++ b/core/src/container.cpp @@ -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 }));