summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmCPluginAPI.cxx')
-rw-r--r--Source/cmCPluginAPI.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index abec968..c2c5bdb 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -615,7 +615,11 @@ static void CCONV cmSourceFileSetProperty(void* arg, const char* prop,
{
cmCPluginAPISourceFile* sf = static_cast<cmCPluginAPISourceFile*>(arg);
if (cmSourceFile* rsf = sf->RealSourceFile) {
- rsf->SetProperty(prop, value);
+ if (value == nullptr) {
+ rsf->SetProperty(prop, nullptr);
+ } else {
+ rsf->SetProperty(prop, value);
+ }
} else if (prop) {
if (!value) {
value = "NOTFOUND";