summaryrefslogtreecommitdiffstats
path: root/Source/cmCPluginAPI.cxx
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-05-26 09:09:07 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-26 12:48:22 (GMT)
commitaa5fed5052f903614a06c55786a1f682fee787a5 (patch)
treeadcf76aa35a0f8aab8b0a15db3be43cfd773855c /Source/cmCPluginAPI.cxx
parenta645a80040d35162ba34ddec39b1b90b2466b72f (diff)
downloadCMake-aa5fed5052f903614a06c55786a1f682fee787a5.zip
CMake-aa5fed5052f903614a06c55786a1f682fee787a5.tar.gz
CMake-aa5fed5052f903614a06c55786a1f682fee787a5.tar.bz2
SetProperty: suppress raw pointer usage
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";