Skip to content

Commit e1ac8be

Browse files
committed
Clear plistfilenames
1 parent 7a455a7 commit e1ac8be

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/cppcheck.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,14 +131,17 @@ class CppCheck::CppCheckLogger : public ErrorLogger
131131

132132
void setPlistFilenames(std::vector<std::string> files)
133133
{
134-
mPlistFilenames = std::move(files);
134+
if (mPlistFile.is_open()) {
135+
mPlistFilenames = std::move(files);
136+
}
135137
}
136138

137139
void closePlist()
138140
{
139141
if (mPlistFile.is_open()) {
140142
mPlistFile << ErrorLogger::plistFooter(mPlistFilenames);
141143
mPlistFile.close();
144+
mPlistFilenames.clear();
142145
}
143146
}
144147

0 commit comments

Comments
 (0)