mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Fix potential null exception in screen button without texture assigned
This commit is contained in:
@@ -242,8 +242,8 @@ void TouchScreenButton::_input(const InputEvent& p_event) {
|
||||
touched=true;
|
||||
}
|
||||
} else {
|
||||
|
||||
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
||||
if (!texture.is_null())
|
||||
touched=Rect2(Point2(),texture->get_size()).has_point(coord);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user