BUG: If the scanner is not defined this would crash. For example when using new language

This commit is contained in:
Andy Cedilnik 2005-08-19 10:13:04 -04:00
parent 904305e3cb
commit 8d8c3be72b

View File

@ -2830,6 +2830,8 @@ cmLocalUnixMakefileGenerator3
} }
#endif #endif
if (scanner)
{
// for each file we need to scan // for each file we need to scan
std::string srcLang = "CMAKE_DEPENDS_CHECK_"; std::string srcLang = "CMAKE_DEPENDS_CHECK_";
srcLang += lang; srcLang += lang;
@ -2848,8 +2850,6 @@ cmLocalUnixMakefileGenerator3
} }
// free the scanner for this language // free the scanner for this language
if (scanner)
{
delete scanner; delete scanner;
} }
} }