From 9d137148602cd362c6319fa0291d8ea505a8005a Mon Sep 17 00:00:00 2001 From: chensihan Date: Mon, 9 Dec 2024 15:56:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E5=A4=84=E7=90=86=20Signed-off-by:=20?= =?UTF-8?q?chensihan=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frameworks/native/backup_ext/src/ext_extension.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/frameworks/native/backup_ext/src/ext_extension.cpp b/frameworks/native/backup_ext/src/ext_extension.cpp index f92dbab7c..30ac66a38 100644 --- a/frameworks/native/backup_ext/src/ext_extension.cpp +++ b/frameworks/native/backup_ext/src/ext_extension.cpp @@ -1806,6 +1806,11 @@ ErrCode BackupExtExtension::HandleRestore(bool isClearData) .GetCode(); } + auto proxy = ServiceProxy::GetInstance(); + if (proxy == nullptr) { + HILOGE("Failed to obtain the ServiceProxy handle"); + return BError(BError::Codes::EXT_BROKEN_BACKUP_SA).GetCode(); + } // async do restore. if (extension_->WasFromSpecialVersion() && extension_->RestoreDataReady()) { HILOGI("Restore directly when upgrading."); -- Gitee