From cc6db7b3281e57a693fab777244cc48ad288c97f Mon Sep 17 00:00:00 2001 From: guanzengkun Date: Tue, 23 Jul 2024 09:51:17 +0800 Subject: [PATCH] =?UTF-8?q?https://gitee.com/openharmony/arkui=5Face=5Feng?= =?UTF-8?q?ine/issues/IAEU8T=20Description:=20UpdateFontScale=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=88=A4=E7=A9=BA=20Sig:=20SIG=5FApplicationFramework?= =?UTF-8?q?=20Feature=20or=20Bugfix:Bugfix=20Binary=20Source:No=20TDD:(?= =?UTF-8?q?=E8=AF=84=E4=BC=B0=E4=B8=8D=E6=B6=89=E5=8F=8A)=20XTS:Pass=20?= =?UTF-8?q?=E9=A2=84=E6=B5=8B=E8=AF=95:=E8=AF=84=E4=BC=B0=E4=B8=8D?= =?UTF-8?q?=E6=B6=89=E5=8F=8A=20Signed-off-by:guanzengkun=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adapter/ohos/entrance/ui_content_impl.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adapter/ohos/entrance/ui_content_impl.cpp b/adapter/ohos/entrance/ui_content_impl.cpp index 9bf9e8eba77..b0a53daa7f7 100644 --- a/adapter/ohos/entrance/ui_content_impl.cpp +++ b/adapter/ohos/entrance/ui_content_impl.cpp @@ -1205,7 +1205,9 @@ UIContentErrorCode UIContentImpl::CommonInitializeForm( reinterpret_cast(ref), context); } } - UpdateFontScale(context->GetConfiguration()); + if (context) { + UpdateFontScale(context->GetConfiguration()); + } return UIContentErrorCode::NO_ERRORS; }