From 504bc5cc6719db3bcafa5f1262b95fa2a58ec0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Mon, 5 Apr 2021 08:52:21 +0200 Subject: Fix crashes in *_input functions --- scene/gui/scroll_bar.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/gui/scroll_bar.cpp') diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index a56bf15507..62276e3af0 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -42,6 +42,8 @@ void ScrollBar::set_can_focus_by_default(bool p_can_focus) { } void ScrollBar::_gui_input(Ref p_event) { + ERR_FAIL_COND(p_event.is_null()); + Ref m = p_event; if (!m.is_valid() || drag.active) { emit_signal("scrolling"); -- cgit v1.2.3