Merge pull request #34246 from tygree/nan-in-sprite-fix

Fixed a bug within sprite.cpp that caused a nan value to appear
This commit is contained in:
Rémi Verschelde 2019-12-16 15:03:58 +01:00 committed by GitHub
commit 817165b96c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);