summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Valta <cg@jakorasia.info>2022-12-30 09:57:55 +0200
committerHenri Valta <cg@jakorasia.info>2023-01-12 12:27:25 +0200
commit81d0f428006c5f0b00893b5d43e0837b44b92631 (patch)
tree51abfb8210cd1b3906d58c32894245d57c1a3196
parent0daa86d70e7338506c37bee6b6e0c4aba7255d68 (diff)
Fix crash in RichTextLabel table parsing
Fixed with help of feedback from bruvzg. Prevents invalid items getting to stack.
-rw-r--r--scene/gui/rich_text_label.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index d5c4fd3f07..af567be3de 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -3336,6 +3336,7 @@ void RichTextLabel::push_table(int p_columns, InlineAlignment p_alignment, int p
_stop_thread();
MutexLock data_lock(data_mutex);
+ ERR_FAIL_COND(current->type == ITEM_TABLE);
ERR_FAIL_COND(p_columns < 1);
ItemTable *item = memnew(ItemTable);