Skip to content

Commit 9b7bcd8

Browse files
committed
fix(ohos): text reset styled string for some crash
1 parent 0f84082 commit 9b7bcd8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

framework/ohos/src/main/cpp/impl/renderer/native/src/components/rich_text_view.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ void RichTextView::CreateArkUINodeImpl() {
9292
void RichTextView::DestroyArkUINodeImpl() {
9393
#ifdef OHOS_DRAW_TEXT
9494
containerNode_ = nullptr;
95+
# ifndef OHOS_DRAW_CUSTOM_TEXT
96+
if (textNode_) {
97+
textNode_->ResetTextContentWithStyledStringAttribute();
98+
}
99+
# endif
95100
#endif
96101
textNode_ = nullptr;
97102
ClearProps();

0 commit comments

Comments
 (0)