summaryrefslogtreecommitdiffstats
path: root/Source/cmSetSourceFilesPropertiesCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-06-13 20:47:41 (GMT)
committerBrad King <brad.king@kitware.com>2003-06-13 20:47:41 (GMT)
commitdc87f60ca22ef2296655816d674874948ec8c7c1 (patch)
tree047d6df3c8f097077138c3e7a3574d6be02f2025 /Source/cmSetSourceFilesPropertiesCommand.cxx
parentabffd72cbb5753e11ca7a44e837e9d02f704fb21 (diff)
downloadCMake-dc87f60ca22ef2296655816d674874948ec8c7c1.zip
CMake-dc87f60ca22ef2296655816d674874948ec8c7c1.tar.gz
CMake-dc87f60ca22ef2296655816d674874948ec8c7c1.tar.bz2
BUG: Fixed crash when source file cannot be looked up correctly.
Diffstat (limited to 'Source/cmSetSourceFilesPropertiesCommand.cxx')
-rw-r--r--Source/cmSetSourceFilesPropertiesCommand.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/cmSetSourceFilesPropertiesCommand.cxx b/Source/cmSetSourceFilesPropertiesCommand.cxx
index 65e85fe..49768a0 100644
--- a/Source/cmSetSourceFilesPropertiesCommand.cxx
+++ b/Source/cmSetSourceFilesPropertiesCommand.cxx
@@ -128,10 +128,13 @@ bool cmSetSourceFilesPropertiesCommand::InitialPass(
// get the source file
cmSourceFile* sf =
m_Makefile->GetOrCreateSource(args[i].c_str(), generated);
- // now loop through all the props and set them
- for (k = 0; k < propertyPairs.size(); k = k + 2)
+ if(sf)
{
- sf->SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str());
+ // now loop through all the props and set them
+ for (k = 0; k < propertyPairs.size(); k = k + 2)
+ {
+ sf->SetProperty(propertyPairs[k].c_str(),propertyPairs[k+1].c_str());
+ }
}
}
return true;