From a9546b7423334c554fe65ee297b6e0925806bf0d Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Sun, 18 Feb 2024 18:53:32 +0800 Subject: [PATCH] =?utf8?q?=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E8=AF=AD?= =?utf8?q?=E8=A8=80=E9=80=80=E5=87=BA=E4=BC=9A=E6=AD=BB=E6=9C=BA=E7=9A=84?= =?utf8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../fd230app/nativeui/system/src/SystemPresenter.cpp | 2 +- .../wearable/fd230app/nativeui/system/src/SystemView.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp index b118fc18a..de1c7df9a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp @@ -67,7 +67,7 @@ namespace OHOS { for (int i = 1; i < MAX_SYSTEMVIEWID; i++) { - if (p_SystemView->GetSystemScrollView(i)->IsVisible() == true) + if (p_SystemView->GetSystemScrollView(i)!=nullptr && p_SystemView->GetSystemScrollView(i)->IsVisible() == true) { p_SystemView->ChangeView(i, SYSTEMVIEW); break; diff --git a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp index 6439fba69..85dc04cba 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp @@ -272,9 +272,13 @@ namespace OHOS } return true; } - + UIScrollView *SystemView::GetSystemScrollView(int ViewId) { + if (SystemScrollView[ViewId] == nullptr) + { + return nullptr; + } return SystemScrollView[ViewId]; } -- 2.17.1