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; }