diff options
Diffstat (limited to 'Source/cmTest.cxx')
-rw-r--r-- | Source/cmTest.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmTest.cxx b/Source/cmTest.cxx index 3b731cc5bc..56c441a986 100644 --- a/Source/cmTest.cxx +++ b/Source/cmTest.cxx @@ -34,15 +34,16 @@ void cmTest::SetCommand(std::vector<std::string> const& command) const char* cmTest::GetProperty(const std::string& prop) const { - const char* retVal = this->Properties.GetPropertyValue(prop); + cmProp retVal = this->Properties.GetPropertyValue(prop); if (!retVal) { const bool chain = this->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TEST); if (chain) { return this->Makefile->GetProperty(prop, chain); } + return nullptr; } - return retVal; + return retVal->c_str(); } bool cmTest::GetPropertyAsBool(const std::string& prop) const |