diff --git a/src/org/infinity/gui/ButtonPopupWindow.java b/src/org/infinity/gui/ButtonPopupWindow.java index 7d4429c78..bfb2d4ae2 100644 --- a/src/org/infinity/gui/ButtonPopupWindow.java +++ b/src/org/infinity/gui/ButtonPopupWindow.java @@ -275,14 +275,14 @@ public void removeGlobalKeyStroke(Object key, KeyStroke keyStroke) { protected void firePopupWindowListener(boolean becomeVisible) { PopupWindowEvent event = null; - for (PopupWindowListener listener : listeners) { + for (int i = 0, size = listeners.size(); i < size; i++) { if (event == null) { event = new PopupWindowEvent(this); } if (becomeVisible) { - listener.popupWindowWillBecomeVisible(event); + listeners.get(i).popupWindowWillBecomeVisible(event); } else { - listener.popupWindowWillBecomeInvisible(event); + listeners.get(i).popupWindowWillBecomeInvisible(event); } } }