diff --git a/sourcehandler/src/distributed_input_source_handler.cpp b/sourcehandler/src/distributed_input_source_handler.cpp index b5b7c7c..47f7c67 100644 --- a/sourcehandler/src/distributed_input_source_handler.cpp +++ b/sourcehandler/src/distributed_input_source_handler.cpp @@ -28,6 +28,15 @@ IMPLEMENT_SINGLE_INSTANCE(DistributedInputSourceHandler); DistributedInputSourceHandler::~DistributedInputSourceHandler() { + DHLOGI("DInputSourceHandler construct."); + std::lock_guard lock(proxyMutex_); + if (sourceSvrRecipient_ == nullptr) { + sourceSvrRecipient_ = new (std::nothrow) DInputSourceSvrRecipient(); + } + + if (sourceSvrRecipient_ == nullptr) { + sourceSvrRecipient_ = new (std::nothrow) LoadDInputSourceCallback(); + } } int32_t DistributedInputSourceHandler::InitSource(const std::string ¶ms)