mirror of
https://github.com/godotengine/godot
synced 2024-09-06 03:03:33 +00:00
RichTextLabel::add_image Fail if passed image has no area
This commit is contained in:
parent
cdfd3ffe15
commit
a4afdd4a77
|
@ -2253,6 +2253,8 @@ void RichTextLabel::add_image(const Ref<Texture2D> &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;
|
||||
|
|
Loading…
Reference in a new issue