Changeset 3087 in josm for trunk


Ignore:
Timestamp:
2010-03-05T15:18:03+01:00 (10 years ago)
Author:
mjulius
Message:

see #4674 - NPE in ToggleDialog

now throws IllegalArgumentException when ToggleDialogAction() gets no ToggleDialog to toggle.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/dialogs/ToggleDialog.java

    r3016 r3087  
    142142        private ToggleDialogAction(ToggleDialog dialog, String name, String iconName, String tooltip, Shortcut shortcut, String prefname) {
    143143            super(name, iconName, tooltip, shortcut, false);
     144            if (dialog == null)
     145                throw new IllegalArgumentException("The ToggleDialog supplied for " + name + " cannot be null.");
    144146            this.dialog = dialog;
    145147        }
Note: See TracChangeset for help on using the changeset viewer.