From 0d8f8a0dc25d5b57c838e8b8537a8e463f8c7207 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Tue, 19 Aug 2003 11:02:56 -0400 Subject: [PATCH] ERR: Fix crash of cmake on broken load commands --- Source/cmLoadCommandCommand.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmLoadCommandCommand.cxx b/Source/cmLoadCommandCommand.cxx index e5ef7ec72..9b3d4658e 100644 --- a/Source/cmLoadCommandCommand.cxx +++ b/Source/cmLoadCommandCommand.cxx @@ -206,10 +206,11 @@ bool cmLoadCommandCommand::InitialPass(std::vector 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;