Commit 0a08d8b6 authored by Ahmed Ashour's avatar Ahmed Ashour Committed by skylot

fix(gui): NPE if the autosave is enabled and project is initial (PR #565)

parent 7b18d3a3
...@@ -91,6 +91,7 @@ public class JadxProject { ...@@ -91,6 +91,7 @@ public class JadxProject {
} }
public void save() { public void save() {
if (getProjectPath() != null) {
try (BufferedWriter writer = Files.newBufferedWriter(getProjectPath())) { try (BufferedWriter writer = Files.newBufferedWriter(getProjectPath())) {
writer.write(GSON.toJson(this)); writer.write(GSON.toJson(this));
saved = true; saved = true;
...@@ -98,6 +99,7 @@ public class JadxProject { ...@@ -98,6 +99,7 @@ public class JadxProject {
LOG.error("Error saving project", e); LOG.error("Error saving project", e);
} }
} }
}
public static JadxProject from(Path path, JadxSettings settings) { public static JadxProject from(Path path, JadxSettings settings) {
try { try {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment