summaryrefslogtreecommitdiff
path: root/library/global.cpp
Side-by-side diff
Diffstat (limited to 'library/global.cpp') (more/less context) (show whitespace changes)
-rw-r--r--library/global.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/library/global.cpp b/library/global.cpp
index f7a0767..7bdd0b1 100644
--- a/library/global.cpp
+++ b/library/global.cpp
@@ -242,14 +242,13 @@ const QDawg& Global::fixedDawg()
QFile in(fn);
if ( in.open(IO_ReadOnly) ) {
fixed_dawg->createFromWords(&in);
- dawgfile.open(IO_WriteOnly);
+ if (dawgfile.open(IO_WriteOnly))
fixed_dawg->write(&dawgfile);
dawgfile.close();
}
- } else {
+ } else
fixed_dawg->readFile(dawgfilename);
}
- }
return *fixed_dawg;
}