summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/server_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/server_manager.cpp')
-rw-r--r--src/core/hle/service/server_manager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/server_manager.cpp b/src/core/hle/service/server_manager.cpp
index d1e99b184..e2e399534 100644
--- a/src/core/hle/service/server_manager.cpp
+++ b/src/core/hle/service/server_manager.cpp
@@ -102,16 +102,17 @@ Result ServerManager::RegisterNamedService(const std::string& service_name,
m_system.ServiceManager().RegisterService(service_name, max_sessions, handler)));
// Get the registered port.
- auto port = m_system.ServiceManager().GetServicePort(service_name);
- ASSERT(port.Succeeded());
+ Kernel::KPort* port{};
+ ASSERT(
+ R_SUCCEEDED(m_system.ServiceManager().GetServicePort(std::addressof(port), service_name)));
// Open a new reference to the server port.
- (*port)->GetServerPort().Open();
+ port->GetServerPort().Open();
// Begin tracking the server port.
{
std::scoped_lock ll{m_list_mutex};
- m_ports.emplace(std::addressof((*port)->GetServerPort()), std::move(handler));
+ m_ports.emplace(std::addressof(port->GetServerPort()), std::move(handler));
}
// Signal the wakeup event.