diff --git a/Source/Core/Common/IniFile.cpp b/Source/Core/Common/IniFile.cpp index 3d41ff659d..dda4f5e115 100644 --- a/Source/Core/Common/IniFile.cpp +++ b/Source/Core/Common/IniFile.cpp @@ -262,11 +262,12 @@ bool IniFile::GetKeys(const std::string& sectionName, std::vector* // Return a list of all lines in a section bool IniFile::GetLines(const std::string& sectionName, std::vector* lines, const bool remove_comments) const { + lines->clear(); + const Section* section = GetSection(sectionName); if (!section) return false; - lines->clear(); for (std::string line : section->lines) { line = StripSpaces(line);