diff --git a/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp b/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp index 2d075ea5a8fe311a715325463e4d59aea54f552c..0510a68afa10eedd38afa90aee0ee7b36d15ec8a 100644 --- a/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp +++ b/frameworks/core/components_ng/pattern/dialog/dialog_layout_algorithm.cpp @@ -136,6 +136,7 @@ void DialogLayoutAlgorithm::AnalysisHeightOfChild(LayoutWrapper* layoutWrapper) void DialogLayoutAlgorithm::AnalysisLayoutOfContent(LayoutWrapper* layoutWrapper, const RefPtr& scroll) { auto text = scroll->GetAllChildrenWithBuild().front(); + CHECK_NULL_VOID(text); auto layoutAlgorithmWrapper = DynamicCast(text->GetLayoutAlgorithm()); CHECK_NULL_VOID(layoutAlgorithmWrapper); auto textLayoutAlgorithm = DynamicCast(layoutAlgorithmWrapper->GetLayoutAlgorithm());