From e8a458edde2f2323d68379119590bb080e106040 Mon Sep 17 00:00:00 2001 From: PKEuS Date: Sun, 8 Apr 2012 10:05:44 +0200 Subject: [PATCH] Fixed crash when --errorlist is given (#3711) --- cli/cppcheckexecutor.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cli/cppcheckexecutor.cpp b/cli/cppcheckexecutor.cpp index 0beb76b98..48fee9415 100644 --- a/cli/cppcheckexecutor.cpp +++ b/cli/cppcheckexecutor.cpp @@ -147,13 +147,14 @@ int CppCheckExecutor::check(int argc, const char* const argv[]) Preprocessor::missingIncludeFlag = false; CppCheck cppCheck(*this, true); - if (!parseFromArgs(&cppCheck, argc, argv)) { - return EXIT_FAILURE; - } Settings& settings = cppCheck.settings(); _settings = &settings; + if (!parseFromArgs(&cppCheck, argc, argv)) { + return EXIT_FAILURE; + } + if (settings.reportProgress) time1 = std::time(0);