summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLoadCommandCommand.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx
index e5ef7ec..9b3d465 100644
--- a/Source/cmLoadCommandCommand.cxx
+++ b/Source/cmLoadCommandCommand.cxx
@@ -206,10 +206,11 @@ bool cmLoadCommandCommand::InitialPass(std::vector<std::string> const& args)
{
std::string err = "Attempt to load the library ";
err += fullPath + " failed.";
- if ( cmDynamicLoader::LastError() )
+ const char* error = cmDynamicLoader::LastError();
+ if ( error )
{
err += " Additional error info is:\n";
- err += cmDynamicLoader::LastError();
+ err += error;
}
this->SetError(err.c_str());
return false;