Avoid infinite recursion with unhandled second touch (#14915)

This commit is contained in:
grorp 2024-08-03 18:48:25 +02:00 committed by GitHub
parent c489cef875
commit 95a0cc8f9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -319,6 +319,11 @@ bool GUIModalMenu::preprocessEvent(const SEvent &event)
}
#endif
// If the second touch arrives here again, that means nobody handled it.
// Abort to avoid infinite recursion.
if (m_second_touch)
return true;
// Convert touch events into mouse events.
if (event.EventType == EET_TOUCH_INPUT_EVENT) {
irr_ptr<GUIModalMenu> holder;