Merge remote-tracking branch 'origin/GP-1557-dragonmacher-options-npe'

into Ghidra_10.1 (Closes #3686)
This commit is contained in:
ghidra1
2021-11-30 19:24:02 -05:00
2 changed files with 16 additions and 15 deletions

View File

@@ -410,8 +410,10 @@ public class OptionsPanel extends JPanel {
} }
String[] descriptions = editor.getOptionDescriptions(); String[] descriptions = editor.getOptionDescriptions();
for (String string : descriptions) { if (descriptions != null) {
results.add(string); for (String string : descriptions) {
results.add(string);
}
} }
} }
} }

View File

@@ -1,6 +1,5 @@
/* ### /* ###
* IP: GHIDRA * IP: GHIDRA
* REVIEWED: YES
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@@ -23,15 +22,15 @@ package ghidra.framework.options;
*/ */
public interface CustomOptionsEditor { public interface CustomOptionsEditor {
/** /**
* Gets the names of the options that this editor is editing. * Gets the names of the options that this editor is editing.
* @return the names of the options that this editor is editing. * @return the names of the options that this editor is editing; may not be null.
*/ */
public String[] getOptionNames(); public String[] getOptionNames();
/** /**
* Gets the descriptions of the options that this editor is editing. * Gets the descriptions of the options that this editor is editing.
* @return the descriptions of the options that this editor is editing. * @return the descriptions of the options that this editor is editing; may be null.
*/ */
public String[] getOptionDescriptions(); public String[] getOptionDescriptions();
} }