Skip to content
Snippets Groups Projects
Commit 0d8f8a0d authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ERR: Fix crash of cmake on broken load commands

parent 5e21538e
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment