From 80bb0a74b9d94dfb708c70ea4dd6842d00f3c3f5 Mon Sep 17 00:00:00 2001 From: sxzheng96 Date: Mon, 21 Mar 2022 18:44:51 +0800 Subject: [PATCH] fix fuzz test problem Signed-off-by: sxzheng96 --- .../sourceservice/dscreenmgr/src/dscreen_manager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp b/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp index 1b5ceb49..49812b88 100644 --- a/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp +++ b/services/screenservice/sourceservice/dscreenmgr/src/dscreen_manager.cpp @@ -199,6 +199,11 @@ int32_t DScreenManager::EnableDistributedScreen(const std::string &devId, const { DHLOGI("EnableDistributedScreen, devId: %s, dhId:%s", GetAnonyString(devId).c_str(), GetAnonyString(dhId).c_str()); + if (!dScreenCallback_) { + DHLOGE("dscreen manager not init."); + return ERR_DH_SCREEN_SA_ENABLE_FAILED; + } + std::string dScreenIdx = devId + SEPERATOR + dhId; std::shared_ptr dScreen = nullptr; if (dScreens_.count(dScreenIdx) != 0) { -- Gitee