summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_layered_editor_plugin.cpp
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 /editor/plugins/texture_layered_editor_plugin.cpp
parenta864a703ee27065795c6297aaeb72ed753d0f279 (diff)
Fix crashes in *_input functions
Diffstat (limited to 'editor/plugins/texture_layered_editor_plugin.cpp')
-rw-r--r--editor/plugins/texture_layered_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/texture_layered_editor_plugin.cpp b/editor/plugins/texture_layered_editor_plugin.cpp
index 265d4ccc1e..89ed98d53e 100644
--- a/editor/plugins/texture_layered_editor_plugin.cpp
+++ b/editor/plugins/texture_layered_editor_plugin.cpp
@@ -35,6 +35,8 @@
#include "editor/editor_settings.h"
void TextureLayeredEditor::_gui_input(Ref<InputEvent> p_event) {
+ ERR_FAIL_COND(p_event.is_null());
+
Ref<InputEventMouseMotion> mm = p_event;
if (mm.is_valid() && mm->get_button_mask() & MOUSE_BUTTON_MASK_LEFT) {
y_rot += -mm->get_relative().x * 0.01;