summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-01-22 15:19:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-01-22 15:19:28 (GMT)
commitde9c3d796491daf6276fe6df25b3ef5d85501ff0 (patch)
tree0d511c1ba5bb538472111a195b27dd5783a712fc /Source
parent63f263b27fa9b9c63f038ff108118726bc9c5c64 (diff)
parent33802b316855b69f2a542574caa4dd2fbe569b11 (diff)
downloadCMake-de9c3d796491daf6276fe6df25b3ef5d85501ff0.zip
CMake-de9c3d796491daf6276fe6df25b3ef5d85501ff0.tar.gz
CMake-de9c3d796491daf6276fe6df25b3ef5d85501ff0.tar.bz2
Merge topic 'serverCrashIfNoMinVersionSpecified'
33802b31 server: fix crash if no min version specified Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1673
Diffstat (limited to 'Source')
-rw-r--r--Source/cmServerProtocol.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 6b7143b..4c0a354 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -1034,8 +1034,8 @@ static Json::Value DumpProjectList(const cmake* cm, std::string const& config)
// Project structure information:
const cmMakefile* mf = lg->GetMakefile();
- pObj[kMINIMUM_CMAKE_VERSION] =
- mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+ auto minVersion = mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
+ pObj[kMINIMUM_CMAKE_VERSION] = minVersion ? minVersion : "";
pObj[kSOURCE_DIRECTORY_KEY] = mf->GetCurrentSourceDirectory();
pObj[kBUILD_DIRECTORY_KEY] = mf->GetCurrentBinaryDirectory();
pObj[kTARGETS_KEY] = DumpTargetsList(projectIt.second, config);