diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-19 10:29:59 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-19 10:29:59 -0400 |
commit | aef3ca6df8d0f2b532adcfd140ad3cb1d5d0b35e (patch) | |
tree | f8e8f2081aec6bfceb4f085050ad70ed949864b4 | |
parent | af721186a135c72740d8c078dc8d5c79ecb88e8a (diff) | |
download | cmake-aef3ca6df8d0f2b532adcfd140ad3cb1d5d0b35e.tar.gz |
BUG: LastError can return 0, so handle that case
-rw-r--r-- | Source/cmLoadCommandCommand.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index b307148ab5..e5ef7ec722 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -205,8 +205,12 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args) if(!lib) { std::string err = "Attempt to load the library "; - err += fullPath + " failed. Additional error info is:\n"; - err += cmDynamicLoader::LastError(); + err += fullPath + " failed."; + if ( cmDynamicLoader::LastError() ) + { + err += " Additional error info is:\n"; + err += cmDynamicLoader::LastError(); + } this->SetError(err.c_str()); return false; } |