From d06d7e671b5fc43a4adf9be7cb823d77bdacfe52 Mon Sep 17 00:00:00 2001 From: ry521 Date: Tue, 10 Oct 2023 12:27:40 +0000 Subject: [PATCH] update sourcehandler/src/distributed_input_source_handler.cpp. Signed-off-by: ry521 --- sourcehandler/src/distributed_input_source_handler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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)