From 32c3f4fb90bbb650d8c3d3c3fb472b9ed6b7dbb7 Mon Sep 17 00:00:00 2001 From: vladislavbelov Date: Sat, 27 Feb 2021 17:21:02 +0000 Subject: [PATCH] Early return in PreprocessorWrapper in case of failed include resolve. This was SVN commit r24951. --- source/graphics/PreprocessorWrapper.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/graphics/PreprocessorWrapper.cpp b/source/graphics/PreprocessorWrapper.cpp index f3480dacbf..91589579a6 100644 --- a/source/graphics/PreprocessorWrapper.cpp +++ b/source/graphics/PreprocessorWrapper.cpp @@ -237,7 +237,8 @@ CStr CPreprocessorWrapper::ResolveIncludes(const CStr& source) // After resolving the following vector should contain a complete list // to concatenate. std::vector 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();