aboutsummaryrefslogtreecommitdiff
path: root/scene/2d/screen_button.cpp
diff options
context:
space:
mode:
authormarynate2014-05-20 21:05:18 +0800
committermarynate2014-05-20 21:07:32 +0800
commitfd13b25d6e1256d3ca04e604441f3a05bb25572b (patch)
treedab7488e57ca5533ee3293a6ac9736017cfe52a4 /scene/2d/screen_button.cpp
parentb324ff7ea584676fcc3292808d7e7ea609982f8e (diff)
downloadgodot-fd13b25d6e1256d3ca04e604441f3a05bb25572b.tar.gz
godot-fd13b25d6e1256d3ca04e604441f3a05bb25572b.tar.zst
godot-fd13b25d6e1256d3ca04e604441f3a05bb25572b.zip
Diffstat (limited to 'scene/2d/screen_button.cpp')
-rw-r--r--scene/2d/screen_button.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp
index 32a532341..9d0c9f3d1 100644
--- a/scene/2d/screen_button.cpp
+++ b/scene/2d/screen_button.cpp
@@ -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);
}