Browse Source

Fix crash in RichTextLabel table parsing

Fixed with help of feedback from bruvzg. Prevents invalid items getting to stack.
Henri Valta 2 years ago
parent
commit
81d0f42800
1 changed files with 1 additions and 0 deletions
  1. 1 0
      scene/gui/rich_text_label.cpp

+ 1 - 0
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);