From f9c9ce20050a2aad66d40d0f49bf97065b624848 Mon Sep 17 00:00:00 2001
From: bunnei <bunneidev@gmail.com>
Date: Sat, 3 Feb 2018 13:29:18 -0500
Subject: [PATCH] ArbitrateLock: Assert that requesting_thread is
 current_thread.

---
 src/core/hle/kernel/svc.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 4c0276cf01..f516927cd1 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -263,6 +263,7 @@ static ResultCode ArbitrateLock(Handle holding_thread_handle, VAddr mutex_addr,
     SharedPtr<Thread> requesting_thread = g_handle_table.Get<Thread>(requesting_thread_handle);
 
     ASSERT(requesting_thread);
+    ASSERT(requesting_thread == GetCurrentThread());
 
     SharedPtr<Mutex> mutex = g_object_address_table.Get<Mutex>(mutex_addr);
     if (!mutex) {
-- 
GitLab