diff options
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/screen_button.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index 6d843b87cd..848f5afeb9 100644 --- a/scene/2d/screen_button.cpp +++ b/scene/2d/screen_button.cpp @@ -170,7 +170,8 @@ void TouchScreenButton::_input(const InputEvent& p_event) { } } else { - touched=Rect2(Point2(),texture->get_size()).has_point(coord); + if (texture.is_valid()) + touched=Rect2(Point2(),texture->get_size()).has_point(coord); } |