1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-31 18:41:20 +00:00

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:
reduz
2014-05-20 20:45:04 -03:00

View File

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