diff --git a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp index e81b0e319de..a4902438ae6 100644 --- a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp +++ b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp @@ -966,7 +966,7 @@ bool TextFieldPattern::GetEditingBoxModel() const { bool isDeclarative = false; auto host = GetHost(); - CHECK_NULL_VOID(host); + CHECK_NULL_RETURN(host, false); auto pipeline = host->GetContext(); if (pipeline && pipeline->GetIsDeclarative()) { isDeclarative = true;