diff options
| author | mailwl <mailwl@gmail.com> | 2018-06-25 18:01:08 +0300 |
|---|---|---|
| committer | mailwl <mailwl@gmail.com> | 2018-06-25 18:01:08 +0300 |
| commit | 52b73904e89376a4b5d930acf27677ba776359eb (patch) | |
| tree | a23688b4219e98237783db2fc570a726e708a15a /src/video_core/debug_utils/debug_utils.h | |
| parent | 1a6e4c3a2ec6b339f15a44144b821c0d6d08798c (diff) | |
Fix crash at exit
Diffstat (limited to 'src/video_core/debug_utils/debug_utils.h')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h index bbba8e3807..9382a75e57 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 |
