Browse Source

ENH: prevent crash

Bill Hoffman 18 years ago
parent
commit
d2b3e06cd0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      Source/cmMakefileLibraryTargetGenerator.cxx

+ 6 - 0
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();