fix(controller): Ensure module runstate

This commit is contained in:
Michael Carlberg 2017-01-12 16:33:41 +01:00
parent f33d383726
commit da9f1d90f4

View File

@ -432,8 +432,11 @@ bool controller::process_update(bool force) {
} }
for (const auto& module : block.second) { for (const auto& module : block.second) {
string module_contents{module->contents()}; if (!module->running()) {
continue;
}
string module_contents{module->contents()};
if (module_contents.empty()) { if (module_contents.empty()) {
continue; continue;
} }
@ -597,6 +600,9 @@ bool controller::on(const sig_ipc::hook& evt) {
for (const auto& block : m_modules) { for (const auto& block : m_modules) {
for (const auto& module : block.second) { for (const auto& module : block.second) {
if (!module->running()) {
continue;
}
auto ipc = dynamic_cast<ipc_module*>(module.get()); auto ipc = dynamic_cast<ipc_module*>(module.get());
if (ipc != nullptr) { if (ipc != nullptr) {
ipc->on_message(hook); ipc->on_message(hook);