Fix crash in InputQueue handling when window object is deleted

This commit is contained in:
Wojtek Figat
2021-03-03 16:43:38 +01:00
parent 3cba76277b
commit dfb502621d

View File

@@ -599,7 +599,7 @@ void InputService::Update()
for (const auto& e : InputEvents) for (const auto& e : InputEvents)
{ {
auto window = e.Target ? e.Target : defaultWindow; auto window = e.Target ? e.Target : defaultWindow;
if (!window) if (!window || !WindowsManager::Windows.Contains(window))
continue; continue;
switch (e.Type) switch (e.Type)
{ {