File tree 1 file changed +5
-3
lines changed
Ghidra/Features/Base/src/main/java/ghidra/app/util/importer 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -37,16 +37,18 @@ public class LcsHintLoadSpecChooser implements LoadSpecChooser {
37
37
* {@link CompilerSpec}.
38
38
*
39
39
* @param language The {@link Language} to use (should not be null)
40
- * @param compilerSpec The {@link CompilerSpec} to use (should not be null )
40
+ * @param compilerSpec The {@link CompilerSpec} to use (f null default compiler spec will be used )
41
41
*/
42
42
public LcsHintLoadSpecChooser (Language language , CompilerSpec compilerSpec ) {
43
43
this .languageID = language .getLanguageID ();
44
- this .compilerSpecID = compilerSpec .getCompilerSpecID ();
44
+ this .compilerSpecID =
45
+ (compilerSpec == null ) ? language .getDefaultCompilerSpec ().getCompilerSpecID ()
46
+ : compilerSpec .getCompilerSpecID ();
45
47
}
46
48
47
49
@ Override
48
50
public LoadSpec choose (LoaderMap loaderMap ) {
49
-
51
+
50
52
// Use the highest priority loader (it will be the first one)
51
53
Loader loader = loaderMap .keySet ().stream ().findFirst ().orElse (null );
52
54
if (loader == null ) {
You can’t perform that action at this time.
0 commit comments