diff --git a/src/server.cc b/src/server.cc index 9a959408092c3796183bb94cdefd35a5ea750a08..06e1a74eea09426699816079d9127b5cc53672df 100644 --- a/src/server.cc +++ b/src/server.cc @@ -96,8 +96,12 @@ namespace graphics policyList.length(1); policyList[0] = PortableServer::ThreadPolicy::_duplicate(threadPolicy); - private_->poa_ = rootPoa->create_POA - ("child", PortableServer::POAManager::_nil(), policyList); + try { + private_->poa_ = rootPoa->create_POA + ("child", PortableServer::POAManager::_nil(), policyList); + } catch (PortableServer::POA::AdapterAlreadyExists& /*e*/) { + private_->poa_ = rootPoa->find_POA ("child", false); + } // Destroy policy object threadPolicy->destroy(); private_->createAndActivateServers(this);