Skip to content

Commit

Permalink
fix(gui): NullPointerException on project save
Browse files Browse the repository at this point in the history
  • Loading branch information
jpstotz committed Apr 23, 2022
1 parent 1832f2a commit f44c769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jadx-gui/src/main/java/jadx/gui/ui/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private void saveProjectAs() {
if (currentDirectory != null) {
fileChooser.setCurrentDirectory(currentDirectory.toFile());
}
if (this.project.getFilePaths().size() == 1) {
if (this.project != null && this.project.getFilePaths() != null && this.project.getFilePaths().size() == 1) {
// If there is only one file loaded we suggest saving the jadx project file next to the loaded file
Path loadedFile = this.project.getFilePaths().get(0);
String fileName = loadedFile.getFileName() + "." + JadxProject.PROJECT_EXTENSION;
Expand Down

0 comments on commit f44c769

Please sign in to comment.