From cfd32a1075264ed31f108b9d29ffd690be63ff89 Mon Sep 17 00:00:00 2001 From: ry521 Date: Sun, 8 Oct 2023 02:17:28 +0000 Subject: [PATCH] update sinkhandler/src/distributed_input_sink_handler.cpp. Signed-off-by: ry521 --- sinkhandler/src/distributed_input_sink_handler.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sinkhandler/src/distributed_input_sink_handler.cpp b/sinkhandler/src/distributed_input_sink_handler.cpp index 817b90f..20a5a13 100644 --- a/sinkhandler/src/distributed_input_sink_handler.cpp +++ b/sinkhandler/src/distributed_input_sink_handler.cpp @@ -128,13 +128,17 @@ void DistributedInputSinkHandler::OnRemoteSinkSvrDied(const wptr DHLOGE("dInputSinkProxy_ is nullptr."); return; } + if (dInputSinkProxy_->AsObject() == nullptr) { + DHLOGE("AsObject is nullptr."); + return; + } sptr remoteObject = remote.promote(); if (remoteObject == nullptr) { DHLOGE("OnRemoteDied remote promoted failed"); return; } - if (dInputSinkProxy_ ->AsObject() != remoteObject) { + if (dInputSinkProxy_->AsObject() != remoteObject) { DHLOGE("OnRemoteSinkSvrDied not found remote object."); return; }