diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 89e01de517d..992e2721866 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2253,6 +2253,8 @@ void RichTextLabel::add_image(const Ref &p_image, const int p_width, } ERR_FAIL_COND(p_image.is_null()); + ERR_FAIL_COND(p_image->get_width() == 0); + ERR_FAIL_COND(p_image->get_height() == 0); ItemImage *item = memnew(ItemImage); item->image = p_image;