Coverity: fix high impact issues
This commit is contained in:
@@ -138,8 +138,12 @@ int main( int argc, char ** argv )
|
||||
// Destruction phase ===========================================================
|
||||
Console().Log("FreeCAD terminating...\n");
|
||||
|
||||
// close open documents
|
||||
App::GetApplication().closeAllDocuments();
|
||||
try {
|
||||
// close open documents
|
||||
App::GetApplication().closeAllDocuments();
|
||||
}
|
||||
catch(...) {
|
||||
}
|
||||
|
||||
// cleans up
|
||||
Application::destruct();
|
||||
|
||||
@@ -118,6 +118,7 @@ extern "C"
|
||||
Dl_info info;
|
||||
int ret = dladdr((void*)initFreeCAD, &info);
|
||||
if ((ret == 0) || (!info.dli_fname)) {
|
||||
free(argv);
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot get path of the FreeCAD module!");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user