summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-06 23:10:47 +0200
committerGitHub <noreply@github.com>2022-06-06 23:10:47 +0200
commit8fb004efbc6161d2adec9501c08cfc9a910086f6 (patch)
treef4814228cf2183fc9afcdcc2f7c36cb0e09fb937
parent3f0ce75738e487612d777efb86fedcd566598f50 (diff)
parentfc77f983cb92e21f82e1f12c338e861dadcfa72f (diff)
Merge pull request #61763 from bruvzg/rtl_predelete
-rw-r--r--scene/gui/rich_text_label.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 0a35b8ecc8..cf7bf930a5 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1613,6 +1613,7 @@ void RichTextLabel::_notification(int p_what) {
update();
} break;
+ case NOTIFICATION_PREDELETE:
case NOTIFICATION_EXIT_TREE: {
_stop_thread();
} break;
@@ -2555,6 +2556,10 @@ bool RichTextLabel::_validate_line_caches() {
void RichTextLabel::_process_line_caches() {
// Shape invalid lines.
+ if (!is_inside_tree()) {
+ return;
+ }
+
MutexLock data_lock(data_mutex);
Rect2 text_rect = _get_text_rect();