Merge pull request #432 from marynate/PR-fix-screen-button-null-texture
Fix potential null exception in screen button without texture assigned
This commit is contained in:
commit
ad61dfed5d
|
@ -242,7 +242,7 @@ void TouchScreenButton::_input(const InputEvent& p_event) {
|
|||
touched=true;
|
||||
}
|
||||
} else {
|
||||
|
||||
if (!texture.is_null())
|
||||
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue