summaryrefslogtreecommitdiffstats
path: root/scene/gui/popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/popup.cpp')
-rw-r--r--scene/gui/popup.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/popup.cpp b/scene/gui/popup.cpp
index c0a2dc81d0..6915f3d242 100644
--- a/scene/gui/popup.cpp
+++ b/scene/gui/popup.cpp
@@ -35,8 +35,7 @@
#include "scene/gui/panel.h"
void Popup::_input_from_window(const Ref<InputEvent> &p_event) {
- Ref<InputEventKey> key = p_event;
- if (get_flag(FLAG_POPUP) && key.is_valid() && key->is_action_pressed(SNAME("ui_cancel"), false, true)) {
+ if (get_flag(FLAG_POPUP) && p_event->is_action_pressed(SNAME("ui_cancel"), false, true)) {
_close_pressed();
}
}