early-access version 1759

This commit is contained in:
pineappleEA
2021-06-07 03:57:28 +02:00
parent 9e2c8d1015
commit 9665cf4742
28 changed files with 873 additions and 58 deletions

View File

@@ -85,8 +85,8 @@ public:
*/
void ClientDisconnected(KServerSession* session);
std::weak_ptr<ServiceThread> GetServiceThread() const {
return service_thread;
std::shared_ptr<ServiceThread> GetServiceThread() const {
return service_thread.lock();
}
protected:
@@ -152,7 +152,7 @@ public:
session_handler = std::move(handler);
}
std::weak_ptr<ServiceThread> GetServiceThread() const {
std::shared_ptr<ServiceThread> GetServiceThread() const {
return session_handler->GetServiceThread();
}

View File

@@ -119,9 +119,11 @@ ResultCode KServerSession::QueueSyncRequest(KThread* thread, Core::Memory::Memor
context->PopulateFromIncomingCommandBuffer(kernel.CurrentProcess()->GetHandleTable(), cmd_buf);
if (auto strong_ptr = manager->GetServiceThread().lock()) {
if (auto strong_ptr = manager->GetServiceThread(); strong_ptr) {
strong_ptr->QueueSyncRequest(*parent, std::move(context));
return ResultSuccess;
} else {
ASSERT(false, "strong_ptr was nullptr!");
}
return ResultSuccess;