[fix] prevent a NPE if openrocket does not detect the example files
This commit is contained in:
parent
1470a84673
commit
d859337e12
@ -50,11 +50,14 @@ public class ExampleDesignFile implements Comparable<ExampleDesignFile> {
|
||||
logger.debug("Cannot find jar file, trying to load from directory");
|
||||
designs = getDirFileNames();
|
||||
}
|
||||
if (designs == null || designs.length == 0) {
|
||||
return null;
|
||||
|
||||
if (designs == null ){
|
||||
return new ExampleDesignFile[0];
|
||||
}
|
||||
|
||||
if( 0 < designs.length ) {
|
||||
Arrays.sort(designs);
|
||||
}
|
||||
|
||||
return designs;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user