修复系统语言退出会死机的问题
authorluozheng <1732036298@qq.com>
Sun, 18 Feb 2024 10:53:32 +0000 (18:53 +0800)
committerluozheng <1732036298@qq.com>
Sun, 18 Feb 2024 10:53:32 +0000 (18:53 +0800)
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemPresenter.cpp
code/sdk/application/wearable/fd230app/nativeui/system/src/SystemView.cpp

index b118fc1..de1c7df 100644 (file)
@@ -67,7 +67,7 @@ namespace OHOS
         {\r
             for (int i = 1; i < MAX_SYSTEMVIEWID; i++)\r
             {\r
-                if (p_SystemView->GetSystemScrollView(i)->IsVisible() == true)\r
+                if (p_SystemView->GetSystemScrollView(i)!=nullptr && p_SystemView->GetSystemScrollView(i)->IsVisible() == true)\r
                 {\r
                     p_SystemView->ChangeView(i, SYSTEMVIEW);\r
                     break;\r
index 6439fba..85dc04c 100644 (file)
@@ -272,9 +272,13 @@ namespace OHOS
         }\r
         return true;\r
     }\r
-    \r
+\r
     UIScrollView *SystemView::GetSystemScrollView(int ViewId)\r
     {\r
+        if (SystemScrollView[ViewId] == nullptr)\r
+        {\r
+            return nullptr;\r
+        }\r
         return SystemScrollView[ViewId];\r
     }\r
 \r