diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-19 14:29:59 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-08-19 14:29:59 (GMT) |
commit | aef3ca6df8d0f2b532adcfd140ad3cb1d5d0b35e (patch) | |
tree | f8e8f2081aec6bfceb4f085050ad70ed949864b4 /Source | |
parent | af721186a135c72740d8c078dc8d5c79ecb88e8a (diff) | |
download | CMake-aef3ca6df8d0f2b532adcfd140ad3cb1d5d0b35e.zip CMake-aef3ca6df8d0f2b532adcfd140ad3cb1d5d0b35e.tar.gz CMake-aef3ca6df8d0f2b532adcfd140ad3cb1d5d0b35e.tar.bz2 |
BUG: LastError can return 0, so handle that case
Diffstat (limited to 'Source')
-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 b307148..e5ef7ec 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; } |