ENH: prevent crash

This commit is contained in:
Bill Hoffman 2007-06-04 17:17:53 -04:00
parent 3e57d1f8ad
commit d2b3e06cd0
1 changed files with 6 additions and 0 deletions

View File

@ -340,6 +340,12 @@ void cmMakefileLibraryTargetGenerator::CopyFrameworkResources(
{
cmCustomCommandLine line;
cmSourceFile* sf = this->Makefile->GetOrCreateSource(i->c_str());
if(!sf)
{
cmSystemTools::Error(
"could not find resource file.", i->c_str());
continue;
}
std::string dest = outpath + "Resources/";
dest += sf->GetSourceName();
std::string ext = sf->GetSourceExtension();