Ghidra is a software reverse engineering (SRE) framework
GP-1557 - fixed NPE in program options when using a filter
dragonmacher8633d89c4ee9
diff --git a/Ghidra/Framework/Docking/src/main/java/docking/options/editor/OptionsPanel.java b/Ghidra/Framework/Docking/src/main/java/docking/options/editor/OptionsPanel.javaindex a4e1469629..2527a16c01 100644--- a/Ghidra/Framework/Docking/src/main/java/docking/options/editor/OptionsPanel.java+++ b/Ghidra/Framework/Docking/src/main/java/docking/options/editor/OptionsPanel.java@@ -410,8 +410,10 @@ public class OptionsPanel extends JPanel {}String[] descriptions = editor.getOptionDescriptions();- for (String string : descriptions) {- results.add(string);+ if (descriptions != null) {+ for (String string : descriptions) {+ results.add(string);+ }}}}diff --git a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/options/CustomOptionsEditor.java b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/options/CustomOptionsEditor.javaindex 17d9315d0c..0d9d5d0501 100644--- a/Ghidra/Framework/Generic/src/main/java/ghidra/framework/options/CustomOptionsEditor.java+++ b/Ghidra/Framework/Generic/src/main/java/ghidra/framework/options/CustomOptionsEditor.java@@ -1,6 +1,5 @@/* ###* IP: GHIDRA- * REVIEWED: YES** Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.@@ -22,16 +21,16 @@ package ghidra.framework.options;* editors that can paint and edit a group of interrelated options.*/public interface CustomOptionsEditor {-- /**- * Gets the names of the options that this editor is editing.- * @return the names of the options that this editor is editing.- */- public String[] getOptionNames();-- /**- * Gets the descriptions of the options that this editor is editing.- * @return the descriptions of the options that this editor is editing.- */- public String[] getOptionDescriptions();++ /**+ * Gets 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();++ /**+ * Gets 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();}