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