Skip to content
Permalink
Browse files

Fix null pointer exception when user deletes profile directory

  • Loading branch information...
danielboudreau danielboudreau
danielboudreau authored and danielboudreau committed Oct 24, 2018
1 parent ae9d499 commit 256b708fb6b252be8a285d85ab28a7148d5b66b5
Showing with 5 additions and 4 deletions.
  1. +5 −4 java/src/jmri/profile/ProfileManager.java
@@ -117,11 +117,12 @@ public boolean hasActiveProfile() {
*
* @return the in use Profile or null if there is no Profile in use
*/
@Nonnull
public Profile getActiveProfile() {
if (activeProfile == null) {
throw new NullPointerException("activeProfile is null");
}
// can be null if user deletes directory
// DBoudreau 10/24/2018
// if (activeProfile == null) {
// throw new NullPointerException("activeProfile is null");
// }
return activeProfile;
}

0 comments on commit 256b708

Please sign in to comment.
You can’t perform that action at this time.