diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index bbba8e3807917866f3ca314091c3d137be25d099..9382a75e577750a61484fdb9c7f3281178329839 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -55,8 +55,10 @@ public:
         virtual ~BreakPointObserver() {
             auto context = context_weak.lock();
             if (context) {
-                std::unique_lock<std::mutex> lock(context->breakpoint_mutex);
-                context->breakpoint_observers.remove(this);
+                {
+                    std::unique_lock<std::mutex> lock(context->breakpoint_mutex);
+                    context->breakpoint_observers.remove(this);
+                }
 
                 // If we are the last observer to be destroyed, tell the debugger context that
                 // it is free to continue. In particular, this is required for a proper yuzu