diff options
author | reduz <reduzio@gmail.com> | 2014-05-20 20:45:04 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2014-05-20 20:45:04 -0300 |
commit | ad61dfed5d3b91cb1e0eabfe48552a331479ffb6 (patch) | |
tree | 74d25a19b8d1040ddbc2c6fda1dda0d798712840 | |
parent | 95d3e9e6605bb44cb8e5e904775531df468a0529 (diff) | |
parent | fd13b25d6e1256d3ca04e604441f3a05bb25572b (diff) |
Merge pull request #432 from marynate/PR-fix-screen-button-null-texture
Fix potential null exception in screen button without texture assigned
-rw-r--r-- | scene/2d/screen_button.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/screen_button.cpp b/scene/2d/screen_button.cpp index 32a5323419..9d0c9f3d1a 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); } |