From 708928e64374971f411431dc8d8382a0a471828a Mon Sep 17 00:00:00 2001 From: Eran Mizrahi Date: Sun, 24 Dec 2017 17:24:46 +0200 Subject: [PATCH] Fix rare crash when deactiving mods --- src/shared/directoryentry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shared/directoryentry.cpp b/src/shared/directoryentry.cpp index e1cba08ca..cebf270ec 100644 --- a/src/shared/directoryentry.cpp +++ b/src/shared/directoryentry.cpp @@ -213,9 +213,9 @@ void FilesOrigin::setName(const std::wstring &name) std::vector FilesOrigin::getFiles() const { std::vector 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; }