From dfb502621d26163caf5c186e2bc38b19f7055158 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 3 Mar 2021 16:43:38 +0100 Subject: [PATCH] Fix crash in InputQueue handling when window object is deleted --- Source/Engine/Input/Input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Engine/Input/Input.cpp b/Source/Engine/Input/Input.cpp index 73d5316eb..485d5a891 100644 --- a/Source/Engine/Input/Input.cpp +++ b/Source/Engine/Input/Input.cpp @@ -599,7 +599,7 @@ void InputService::Update() for (const auto& e : InputEvents) { auto window = e.Target ? e.Target : defaultWindow; - if (!window) + if (!window || !WindowsManager::Windows.Contains(window)) continue; switch (e.Type) {