@@ -196,15 +196,17 @@ ImportProject::Type ImportProject::import(const std::string &filename, Settings
196196 if (!mPath .empty () && !endsWith (mPath ,' /' ))
197197 mPath += ' /' ;
198198
199+ const std::string fileFilter = settings ? settings->fileFilter : std::string ();
200+
199201 if (endsWith (filename, " .json" , 5 )) {
200202 importCompileCommands (fin);
201203 return ImportProject::Type::COMPILE_DB;
202204 } else if (endsWith (filename, " .sln" , 4 )) {
203- importSln (fin, mPath , settings-> fileFilter );
205+ importSln (fin, mPath , fileFilter);
204206 return ImportProject::Type::VS_SLN;
205207 } else if (endsWith (filename, " .vcxproj" , 8 )) {
206208 std::map<std::string, std::string, cppcheck::stricmp> variables;
207- importVcxproj (filename, variables, emptyString, settings-> fileFilter );
209+ importVcxproj (filename, variables, emptyString, fileFilter);
208210 return ImportProject::Type::VS_VCXPROJ;
209211 } else if (endsWith (filename, " .bpr" , 4 )) {
210212 importBcb6Prj (filename);
0 commit comments