summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r--Source/cmCPluginAPI.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index 1a1bbec..ee2960b 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -581,13 +581,13 @@ const char* CCONV cmSourceFileGetProperty(void* arg, const char* prop)
cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
if (cmSourceFile* rsf = sf->RealSourceFile) {
cmProp p = rsf->GetProperty(prop);
- return p ? p->c_str() : nullptr;
+ return cmToCStr(p);
}
if (!strcmp(prop, "LOCATION")) {
return sf->FullPath.c_str();
}
cmProp retVal = sf->Properties.GetPropertyValue(prop);
- return retVal ? retVal->c_str() : nullptr;
+ return cmToCStr(retVal);
}
int CCONV cmSourceFileGetPropertyAsBool(void* arg, const char* prop)