diff --git a/src/gui/guiInventoryList.cpp b/src/gui/guiInventoryList.cpp index b8ed324c3..82e769102 100644 --- a/src/gui/guiInventoryList.cpp +++ b/src/gui/guiInventoryList.cpp @@ -205,6 +205,9 @@ bool GUIInventoryList::OnEvent(const SEvent &event) bool ret = hovered->OnEvent(event); + // Set visible again *after* processing the event. Otherwise, hovered could + // be another GUIInventoryList, which will call this one again, resulting in + // an infinite loop. IsVisible = was_visible; return ret;