same fix as in SignCAD()

This commit is contained in:
eap 2021-08-19 17:09:28 +03:00
parent 4a8f4b4c1c
commit 499331b207

View File

@ -373,7 +373,6 @@ namespace SMESHUtils_MGLicenseKeyGen // API implementation
}
else
{
SMESH_TRY;
ok = signFun( meshgems_cad );
@ -403,6 +402,7 @@ namespace SMESHUtils_MGLicenseKeyGen // API implementation
if ( !loadLibrary( error, libraryFile ))
return false;
bool ok = false;
typedef bool (*SignFun)(void* );
SignFun signFun = (SignFun) GetProc( theLibraryHandle, "SignMesh" );
if ( !signFun )
@ -410,8 +410,8 @@ namespace SMESHUtils_MGLicenseKeyGen // API implementation
if ( ! getLastError( error ))
error = SMESH_Comment( "Can't find symbol 'SignMesh' in '") << getenv( theEnvVar ) << "'";
}
bool ok;
else
{
SMESH_TRY;
ok = signFun( meshgems_mesh );
@ -422,7 +422,7 @@ namespace SMESHUtils_MGLicenseKeyGen // API implementation
ok = false;
else if ( !ok )
error = "SignMesh() failed (located in '" + libraryFile._name + "')";
}
return ok;
}
@ -455,8 +455,10 @@ namespace SMESHUtils_MGLicenseKeyGen // API implementation
if ( ! getLastError( error ))
error = SMESH_Comment( "Can't find symbol 'GetKey' in '") << getenv( theEnvVar ) << "'";
}
else
{
key = keyFun( gmfFile, nbVertex, nbEdge, nbFace, nbVol );
}
if ( key.empty() )
error = "GetKey() failed (located in '" + libraryFile._name + "')";