summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 793c605..5c010b4 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -339,7 +339,11 @@ void cmGlobalVisualStudio10Generator::EnableLanguage(
const char* cmGlobalVisualStudio10Generator::GetPlatformToolset() const
{
- return this->GetPlatformToolsetString().c_str();
+ std::string const& toolset = this->GetPlatformToolsetString();
+ if (toolset.empty()) {
+ return CM_NULLPTR;
+ }
+ return toolset.c_str();
}
std::string const& cmGlobalVisualStudio10Generator::GetPlatformToolsetString()