فهرست منبع

ERR: Fix crash of cmake on broken load commands

Andy Cedilnik 22 سال پیش
والد
کامیت
0d8f8a0dc2
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      Source/cmLoadCommandCommand.cxx

+ 3 - 2
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;