Index: /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 11676)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/ToolbarPreferences.java	(revision 11677)
@@ -1131,6 +1131,6 @@
      */
     public Action unregister(Action action) {
-        String toolbar = (String) action.getValue("toolbar");
-        if (toolbar != null) {
+        Object toolbar = action.getValue("toolbar");
+        if (toolbar instanceof String) {
             return regactions.remove(toolbar);
         }
