From ad39bab2710bd29493ba62aead9e0a72ea1815c4 Mon Sep 17 00:00:00 2001 From: mailwl Date: Mon, 25 Jun 2018 18:01:08 +0300 Subject: Fix crash at exit --- src/video_core/debug_utils/debug_utils.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h index bbba8e380..9382a75e5 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 lock(context->breakpoint_mutex); - context->breakpoint_observers.remove(this); + { + std::unique_lock 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 -- cgit v1.2.3