diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-08-24 02:52:31 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-08-24 02:52:31 +0000 |
commit | be13028a2b70942a7c112538d853dae6d8500a18 (patch) | |
tree | 337b4dbf9025375d646303a1451df5c1fe797ae2 /cppe/src | |
parent | bug fix (diff) | |
download | ice-be13028a2b70942a7c112538d853dae6d8500a18.tar.bz2 ice-be13028a2b70942a7c112538d853dae6d8500a18.tar.xz ice-be13028a2b70942a7c112538d853dae6d8500a18.zip |
Fixed bug with finishSetup.
Diffstat (limited to 'cppe/src')
-rwxr-xr-x | cppe/src/IceE/Communicator.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/cppe/src/IceE/Communicator.cpp b/cppe/src/IceE/Communicator.cpp index 6101ab82c61..cb5a33698b0 100755 --- a/cppe/src/IceE/Communicator.cpp +++ b/cppe/src/IceE/Communicator.cpp @@ -137,10 +137,7 @@ Ice::Communicator::createObjectAdapter(const string& name) throw CommunicatorDestroyedException(__FILE__, __LINE__); } - assert(_instance); - ObjectAdapterPtr adapter = _instance->objectAdapterFactory()->createObjectAdapter(name); - - return adapter; + return _instance->objectAdapterFactory()->createObjectAdapter(name); } ObjectAdapterPtr @@ -309,6 +306,14 @@ Ice::Communicator::~Communicator() void Ice::Communicator::finishSetup(int& argc, char* argv[]) { - _instance->finishSetup(argc, argv); + try + { + _instance->finishSetup(argc, argv); + } + catch(...) + { + _destroyed = true; + _instance->destroy(); + throw; + } } - |