mirror of https://github.com/godotengine/godot
RichTextLabel::add_image Fail if passed image has no area
(cherry picked from commit a4afdd4a77)
This commit is contained in:
parent
31744577b3
commit
e40682c32d
|
|
@ -1678,6 +1678,8 @@ void RichTextLabel::add_image(const Ref<Texture> &p_image, const int p_width, co
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ERR_FAIL_COND(p_image.is_null());
|
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);
|
ItemImage *item = memnew(ItemImage);
|
||||||
|
|
||||||
item->image = p_image;
|
item->image = p_image;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue