fixed concurrent modification exception on m_activeDownloads

git-svn-id: svn://anubis/gvsu@62 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-03-09 22:21:56 +00:00
parent 816b148600
commit afba8a711a

View File

@ -163,8 +163,10 @@ public class KaZaGUI extends JFrame
synchronized (m_activeDownloads) synchronized (m_activeDownloads)
{ {
Set<Integer> indices = m_activeDownloads.keySet(); Set<Integer> indices = m_activeDownloads.keySet();
for (Integer i : indices) Object[] arr = indices.toArray();
for (Object o : arr)
{ {
Integer i = (Integer) o;
if (!m_client.isDownloadActive(i)) if (!m_client.isDownloadActive(i))
{ {
KaZaClient.SearchResult sr = m_activeDownloads.get(i); KaZaClient.SearchResult sr = m_activeDownloads.get(i);