summaryrefslogtreecommitdiff
path: root/src/pluginlist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pluginlist.cpp')
-rw-r--r--src/pluginlist.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pluginlist.cpp b/src/pluginlist.cpp
index 927a4c7e..f1a58cfb 100644
--- a/src/pluginlist.cpp
+++ b/src/pluginlist.cpp
@@ -324,6 +324,10 @@ bool PluginList::readLoadOrder(const QString &fileName)
if (!file.open(QIODevice::ReadOnly)) {
return false;
}
+ if (file.size() == 0) {
+ // MO stores at least a header in the file. if it's completely empty the file is broken
+ return false;
+ }
while (!file.atEnd()) {
QByteArray line = file.readLine().trimmed();
QString modName;