1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 18:35:20 +00:00

Fix bug where new addons could not be created since commit ff072441fde05d189cb06cb44cc9c360690c2f09.

This commit is contained in:
cc9cii 2015-12-19 20:57:29 +11:00
parent 40bacc04c5
commit 60d5ea7ab6

View File

@ -3,6 +3,8 @@
#include <stdexcept>
#include <algorithm>
#include <boost/filesystem.hpp>
#include <QAbstractItemModel>
#include <components/esm/esmreader.hpp>
@ -905,9 +907,12 @@ int CSMWorld::Data::getTotalRecords (const std::vector<boost::filesystem::path>&
for (unsigned int i = 0; i < files.size(); ++i)
{
reader->open(files[i].string());
records += reader->getRecordCount();
reader->close();
if (boost::filesystem::exists(files[i].string()))
{
reader->open(files[i].string());
records += reader->getRecordCount();
reader->close();
}
}
return records;
@ -1113,7 +1118,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
else
{
mTopics.load (record, mBase);
mDialogue = &mTopics.getRecord (record.mId).get();
mDialogue = &mTopics.getRecord (record.mId).get();
}
}