Skip to content

Commit c454fff

Browse files
author
Ravbug
committed
Don't error if the file doesn't exist (#56)
1 parent b5e1093 commit c454fff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/interface_derived.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,12 @@ void MainFrameDerived::SaveProjects(){
529529
void MainFrameDerived::SaveEditorVersions(){
530530
ofstream file;
531531
file.open(datapath / editorPathsFile);
532-
for (auto& p : installPaths){
533-
file << p.string() << endl;
534-
}
535-
file.close();
532+
if (file) {
533+
for (auto& p : installPaths) {
534+
file << p.string() << endl;
535+
}
536+
file.close();
537+
}
536538
LoadEditorVersions();
537539
}
538540

0 commit comments

Comments
 (0)