diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index f480e4b..711b5fa 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -1213,6 +1213,12 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase using IndexList = typename Client::MessageSetType::template MessageDescriptorAt< N>::IndexList; + if(!x->init) + { + std::cout << "ERROR: Synth constructor not yet called" << std::endl; + return; + } + launchMessageImpl(x, args, IndexList()); } @@ -1421,6 +1427,7 @@ class FluidSCWrapper : public impl::FluidSCWrapperBase << std::endl; } + bool init{false}; public: using Client = C; @@ -1432,6 +1439,7 @@ public: { client().setParams(params()); //<-IMPORTANT: client's ref to params is by address, and this has just changed impl::FluidSCWrapperBase::init(); + init = true; } ~FluidSCWrapper()