1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-13 16:45:20 +02:00

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

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;