mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 05:33:11 +00:00
Fixed a bug within sprite.cpp that caused nan values to appear when a texture had zero area
This commit is contained in:
parent
d4601776db
commit
e4a0abdd93
@ -315,6 +315,9 @@ bool Sprite::is_pixel_opaque(const Point2 &p_point) const {
|
||||
if (texture.is_null())
|
||||
return false;
|
||||
|
||||
if (texture->get_size().width == 0 || texture->get_size().height == 0)
|
||||
return false;
|
||||
|
||||
Rect2 src_rect, dst_rect;
|
||||
bool filter_clip;
|
||||
_get_rects(src_rect, dst_rect, filter_clip);
|
||||
|
Loading…
Reference in New Issue
Block a user