From 4d5a3d2cd0b8e666aee900feb56f533106262b0d Mon Sep 17 00:00:00 2001 From: Alexander Pavlov Date: Tue, 3 Dec 2024 16:26:16 +0200 Subject: [PATCH] added default value for ioc without application --- src/framework/global/modularity/imodulesetup.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/framework/global/modularity/imodulesetup.h b/src/framework/global/modularity/imodulesetup.h index c9a5c2e01a5c2..4342edd1ff731 100644 --- a/src/framework/global/modularity/imodulesetup.h +++ b/src/framework/global/modularity/imodulesetup.h @@ -59,8 +59,8 @@ class IModuleSetup std::shared_ptr application() const { return m_application; } - const modularity::ContextPtr iocContext() const { return m_application->iocContext(); } - ModulesIoC* ioc() const { return m_application->ioc(); } + const modularity::ContextPtr iocContext() const { return m_application ? m_application->iocContext() : muse::modularity::globalCtx(); } + ModulesIoC* ioc() const { return m_application ? m_application->ioc() : muse::modularity::globalIoc(); } protected: std::shared_ptr m_application;