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,11 +91,13 @@ public class JadxProject { ...@@ -91,11 +91,13 @@ public class JadxProject {
} }
public void save() { public void save() {
try (BufferedWriter writer = Files.newBufferedWriter(getProjectPath())) { if (getProjectPath() != null) {
writer.write(GSON.toJson(this)); try (BufferedWriter writer = Files.newBufferedWriter(getProjectPath())) {
saved = true; writer.write(GSON.toJson(this));
} catch (Exception e) { saved = true;
LOG.error("Error saving project", e); } catch (Exception e) {
LOG.error("Error saving project", e);
}
} }
} }
......
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