summaryrefslogtreecommitdiffstats
path: root/Source/cmGetTargetPropertyCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-06-06 07:41:20 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-06-07 07:29:30 (GMT)
commit3ac4b90bfdcca97f1f63056c97afee38cf66ea12 (patch)
treebbfa8812400f195520a2d305b74750606bc2286e /Source/cmGetTargetPropertyCommand.cxx
parent7c0aa672fe4f1b5c4a15a89d90cd80009a1399d0 (diff)
downloadCMake-3ac4b90bfdcca97f1f63056c97afee38cf66ea12.zip
CMake-3ac4b90bfdcca97f1f63056c97afee38cf66ea12.tar.gz
CMake-3ac4b90bfdcca97f1f63056c97afee38cf66ea12.tar.bz2
cmPropertyMap: Require a non-empty name parameter.
The cmGetPropertyCommand already checks for this.
Diffstat (limited to 'Source/cmGetTargetPropertyCommand.cxx')
-rw-r--r--Source/cmGetTargetPropertyCommand.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGetTargetPropertyCommand.cxx b/Source/cmGetTargetPropertyCommand.cxx
index 315e851..ca40bd0 100644
--- a/Source/cmGetTargetPropertyCommand.cxx
+++ b/Source/cmGetTargetPropertyCommand.cxx
@@ -40,7 +40,11 @@ bool cmGetTargetPropertyCommand
else if(cmTarget* tgt = this->Makefile->FindTargetToUse(targetName))
{
cmTarget& target = *tgt;
- const char* prop_cstr = target.GetProperty(args[2], this->Makefile);
+ const char* prop_cstr = 0;
+ if (!args[2].empty())
+ {
+ prop_cstr = target.GetProperty(args[2], this->Makefile);
+ }
if(prop_cstr)
{
prop = prop_cstr;