Skip to content
Snippets Groups Projects
Commit 3f70410d authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Do not fail if server already exists.

parent 20923585
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment