Skip to content

Commit

Permalink
Merge pull request #161 from erasmux/deactivate_bug_fix
Browse files Browse the repository at this point in the history
Fix rare crash when deactiving mods
  • Loading branch information
LePresidente authored Dec 24, 2017
2 parents db1e63d + 708928e commit 100f57d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/directoryentry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ void FilesOrigin::setName(const std::wstring &name)
std::vector<FileEntry::Ptr> FilesOrigin::getFiles() const
{
std::vector<FileEntry::Ptr> result;
for (FileEntry::Index fileIdx : m_Files) {
result.push_back(m_FileRegister.lock()->getFile(fileIdx));
}
for (FileEntry::Index fileIdx : m_Files)
if (FileEntry::Ptr p = m_FileRegister.lock()->getFile(fileIdx))
result.push_back(p);

return result;
}
Expand Down

0 comments on commit 100f57d

Please sign in to comment.