Skip to content

Commit

Permalink
Solve NPE in open scenario command.
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentg committed Mar 5, 2015
1 parent 6b38980 commit af1cae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/truffautronic/view/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ private void openScenario() {
if (!askForSaving())
return;
JFileChooser fileChooser = new JFileChooser();
if (cwd == null)
if (cwd == null && currentFile != null)
cwd = getParentPath(currentFile);
fileChooser.setCurrentDirectory(cwd);
int retval = fileChooser.showOpenDialog(rootFrame);
Expand Down

0 comments on commit af1cae8

Please sign in to comment.