Skip to content

Commit

Permalink
Fixed crash on OS X with omniORB.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/branches/MathCoreOSMC@4032 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Otto Tronarp committed May 12, 2009
1 parent d3c4037 commit fc4c837
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Compiler/runtime/corbaimpl.cpp
Expand Up @@ -459,14 +459,18 @@ void* runOrb(void* arg)

#if defined(USE_OMNIORB)
try {
poa->destroy(true,true);
if (poa) {
poa->destroy(true,true);
}
} catch (CORBA::Exception&) {
// silently ignore errors here
}
#else
poa->destroy(TRUE,TRUE);
#endif
delete server;
if (server) {
delete server;
}
#endif // NOMICO
return NULL;
}
Expand Down Expand Up @@ -516,7 +520,7 @@ RML_BEGIN_LABEL(Corba__close)
#ifndef NOMICO
try {
#if defined(USE_OMNIORB)
orb->shutdown(false);
orb->shutdown(true); // true otherwise we get a crash on Leopard
#else
orb->shutdown(FALSE);
#endif
Expand Down

0 comments on commit fc4c837

Please sign in to comment.