diff options
author | Brad King <brad.king@kitware.com> | 2018-04-10 19:01:43 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-10 19:01:43 (GMT) |
commit | 3c0fed488fc40c55e136d128b39d3b5c901add97 (patch) | |
tree | eb395f47dd02832932cd5e444b2cd20b6566cc79 /Source | |
parent | ef077c8ba47f39614c4b7bb6f3b745cbfa8f461e (diff) | |
parent | 6f2701abf60bc8c0aeed14e09adf28d59023da87 (diff) | |
download | CMake-3c0fed488fc40c55e136d128b39d3b5c901add97.zip CMake-3c0fed488fc40c55e136d128b39d3b5c901add97.tar.gz CMake-3c0fed488fc40c55e136d128b39d3b5c901add97.tar.bz2 |
Merge branch 'cpack-trace-nullptr' into release-3.11
Merge-request: !1950
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cpack.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 507a10c..b6ff38b 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -350,16 +350,16 @@ int main(int argc, char const* const* argv) } if (parsed) { cpackGenerator = generators.NewGenerator(gen); - if (!cpackGenerator) { + if (cpackGenerator) { + cpackGenerator->SetTrace(trace); + cpackGenerator->SetTraceExpand(traceExpand); + } else { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot initialize CPack generator: " << gen << std::endl); parsed = 0; } - cpackGenerator->SetTrace(trace); - cpackGenerator->SetTraceExpand(traceExpand); - if (parsed && !cpackGenerator->Initialize(gen, mf)) { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot initialize the generator " << gen |