today i've encountered two NPE's. The first prevents the PreferencesDialog to open, the other one crashes muc on start (during the splash screen). Both are in the current HEAD, maybe even in the nightly build.
Quick fix:
- Code: Select all
Index: source/com/mucommander/ui/dialog/pref/general/ShortcutsTable.java
===================================================================
--- source/com/mucommander/ui/dialog/pref/general/ShortcutsTable.java (revision 3170)
+++ source/com/mucommander/ui/dialog/pref/general/ShortcutsTable.java (working copy)
@@ -231,6 +231,10 @@
// Convert the action-classes to MuAction instances
List list = Collections.list(actionClasses);
+ if (list == null) {
+ return new Object[0][NUM_OF_COLUMNS];
+ }
+
// Sort actions by their labels
Collections.sort(list, new Comparator() {
public int compare(Object o1, Object o2) {
Index: source/com/mucommander/ui/helper/MenuToolkit.java
===================================================================
--- source/com/mucommander/ui/helper/MenuToolkit.java (revision 3170)
+++ source/com/mucommander/ui/helper/MenuToolkit.java (working copy)
@@ -133,7 +133,7 @@
private static JMenuItem addMenuItem(JMenu menu, MuAction action, MnemonicHelper mnemonicHelper, boolean createCheckBoxMenuItem) {
JMenuItem menuItem = createCheckBoxMenuItem?new JCheckBoxMenuItem(action):new JMenuItem(action);
- if(mnemonicHelper!=null) {
+ if(mnemonicHelper!=null && action != null) {
char mnemonic = mnemonicHelper.getMnemonic(action.getLabel());
if(mnemonic!=0)
menuItem.setMnemonic(mnemonic);
Another problem: I cannot login to the trac installation to file the bug. My forum login/password combi is rejected
Johann
