Early return in PreprocessorWrapper in case of failed include resolve.

This was SVN commit r24951.
This commit is contained in:
Vladislav Belov 2021-02-27 17:21:02 +00:00
parent 2ce0c2b988
commit 32c3f4fb90

View File

@ -237,7 +237,8 @@ CStr CPreprocessorWrapper::ResolveIncludes(const CStr& source)
// After resolving the following vector should contain a complete list
// to concatenate.
std::vector<std::string_view> processedParts;
ResolveIncludesImpl(source, m_IncludeCache, m_IncludeCallback, chunks, processedParts);
if (!ResolveIncludesImpl(source, m_IncludeCache, m_IncludeCallback, chunks, processedParts))
return {};
std::size_t totalSize = 0;
for (const std::string_view& part : processedParts)
totalSize += part.size();