Fix for a ConcurrentModificationException in CommandFinder
authorMark Longair <mhl@pobox.com>
Sat, 26 Sep 2009 12:52:23 +0000 (26 13:52 +0100)
committerMark Longair <mhl@pobox.com>
Sat, 26 Sep 2009 12:56:15 +0000 (26 13:56 +0100)
This should close bug 80:

  http://pacific.mpi-cbg.de/cgi-bin/bugzilla/show_bug.cgi?id=80

ij/plugin/CommandFinder.java

index 19706c3..853ef02 100644 (file)
@@ -322,7 +322,7 @@ public class CommandFinder implements PlugIn, TextListener, ActionListener, Wind
                /* Find the "normal" commands; those which are
                   registered plugins: */
 
-               Hashtable realCommandsHash = ij.Menus.getCommands();
+               Hashtable realCommandsHash = (Hashtable)(ij.Menus.getCommands().clone());
 
                Set realCommandSet = realCommandsHash.keySet();