From 44062bf4b7862aacb7c14846d36567f6ec76b4aa Mon Sep 17 00:00:00 2001 From: Berk Geveci Date: Mon, 2 Jul 2001 14:03:20 -0400 Subject: [PATCH] Better error checking. --- Source/cmVTKWrapJavaCommand.cxx | 5 +++++ Source/cmVTKWrapPythonCommand.cxx | 5 +++++ Source/cmVTKWrapTclCommand.cxx | 5 +++++ 3 files changed, 15 insertions(+) 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++) {