Skip to content

Commit

Permalink
Merge pull request #2984 from ControlSystemStudio/credentials_fix
Browse files Browse the repository at this point in the history
Fix NPE if save&restore not yet launched
  • Loading branch information
shroffk authored Mar 25, 2024
2 parents 1ee2a6d + ef8564a commit c5f403f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public void secureStoreChanged(List<ScopedAuthenticationToken> validTokens) {
if (appDescriptor != null && appDescriptor instanceof SaveAndRestoreApplication) {
SaveAndRestoreApplication saveAndRestoreApplication = (SaveAndRestoreApplication) appDescriptor;
SaveAndRestoreInstance saveAndRestoreInstance = (SaveAndRestoreInstance) saveAndRestoreApplication.getInstance();
// Save&restore app may not be launched (yet)
if(saveAndRestoreInstance == null){
return;
}
saveAndRestoreInstance.secureStoreChanged(validTokens);
}
}
Expand Down

0 comments on commit c5f403f

Please sign in to comment.