summaryrefslogtreecommitdiffstats
path: root/scene/2d
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2021-04-05 08:52:21 +0200
committerRafał Mikrut <mikrutrafal@protonmail.com>2021-04-05 08:52:21 +0200
commit504bc5cc6719db3bcafa5f1262b95fa2a58ec0a1 (patch)
tree4dc94056680fd757e2b99197c2c3518990755202 /scene/2d
parenta864a703ee27065795c6297aaeb72ed753d0f279 (diff)
downloadredot-engine-504bc5cc6719db3bcafa5f1262b95fa2a58ec0a1.tar.gz
Fix crashes in *_input functions
Diffstat (limited to 'scene/2d')
-rw-r--r--scene/2d/touch_screen_button.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/2d/touch_screen_button.cpp b/scene/2d/touch_screen_button.cpp
index 9d6868a1b2..4e58984b37 100644
--- a/scene/2d/touch_screen_button.cpp
+++ b/scene/2d/touch_screen_button.cpp
@@ -189,6 +189,8 @@ String TouchScreenButton::get_action() const {
}
void TouchScreenButton::_input(const Ref<InputEvent> &p_event) {
+ ERR_FAIL_COND(p_event.is_null());
+
if (!get_tree()) {
return;
}