diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2007-06-04 21:17:53 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2007-06-04 21:17:53 (GMT) |
commit | d2b3e06cd0c17646d903986cfb1bc0e75b2c5460 (patch) | |
tree | 537f688f63751fff005b67e6de87eae7dc44fe84 /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | 3e57d1f8ad054ca9c531ebdcf45564ab64e903cb (diff) | |
download | CMake-d2b3e06cd0c17646d903986cfb1bc0e75b2c5460.zip CMake-d2b3e06cd0c17646d903986cfb1bc0e75b2c5460.tar.gz CMake-d2b3e06cd0c17646d903986cfb1bc0e75b2c5460.tar.bz2 |
ENH: prevent crash
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 4eaefce..edef367 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -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(); |