diff --git a/Source/cmVTKWrapJavaCommand.cxx b/Source/cmVTKWrapJavaCommand.cxx index eba472388..2a91878a2 100644 --- a/Source/cmVTKWrapJavaCommand.cxx +++ b/Source/cmVTKWrapJavaCommand.cxx @@ -69,6 +69,11 @@ bool cmVTKWrapJavaCommand::InitialPass(std::vector& args) j != args.end(); ++j) { cmMakefile::SourceMap::iterator l = Classes.find(*j); + if (l == Classes.end()) + { + this->SetError("bad source list passed to VTKWrapJavaCommand"); + return false; + } for(std::vector::iterator i = l->second.begin(); i != l->second.end(); i++) { diff --git a/Source/cmVTKWrapPythonCommand.cxx b/Source/cmVTKWrapPythonCommand.cxx index 0c1d6a2b7..705a8a451 100644 --- a/Source/cmVTKWrapPythonCommand.cxx +++ b/Source/cmVTKWrapPythonCommand.cxx @@ -70,6 +70,11 @@ bool cmVTKWrapPythonCommand::InitialPass(std::vector& args) j != args.end(); ++j) { cmMakefile::SourceMap::iterator l = Classes.find(*j); + if (l == Classes.end()) + { + this->SetError("bad source list passed to VTKWrapPythonCommand"); + return false; + } for(std::vector::iterator i = l->second.begin(); i != l->second.end(); i++) { diff --git a/Source/cmVTKWrapTclCommand.cxx b/Source/cmVTKWrapTclCommand.cxx index fcf5c452c..8c76017a3 100644 --- a/Source/cmVTKWrapTclCommand.cxx +++ b/Source/cmVTKWrapTclCommand.cxx @@ -101,6 +101,11 @@ bool cmVTKWrapTclCommand::InitialPass(std::vector& args) j != sources.end(); ++j) { cmMakefile::SourceMap::iterator l = Classes.find(*j); + if (l == Classes.end()) + { + this->SetError("bad source list passed to VTKWrapTclCommand"); + return false; + } for(std::vector::iterator i = l->second.begin(); i != l->second.end(); i++) {