about summary refs log tree commit diff stats
path: root/src/dynarec/dynarec_native.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-04-02 15:42:00 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-04-02 15:42:00 +0200
commitc1c11d8daaaee82acd1be3521c280bc8eb72d589 (patch)
treedbdb2ccc427defb953f4f6c5bb657f6d53da449d /src/dynarec/dynarec_native.c
parent0505b193789261501bc203783350bbda79f43b36 (diff)
downloadbox64-c1c11d8daaaee82acd1be3521c280bc8eb72d589.tar.gz
box64-c1c11d8daaaee82acd1be3521c280bc8eb72d589.zip
[DYNAREC] Improved CancelBlock function (might help #1383)
Diffstat (limited to 'src/dynarec/dynarec_native.c')
-rw-r--r--src/dynarec/dynarec_native.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c
index 77badf62..6dca4140 100644
--- a/src/dynarec/dynarec_native.c
+++ b/src/dynarec/dynarec_native.c
@@ -404,7 +404,6 @@ void CancelBlock64(int need_lock)
     if(need_lock)
         mutex_lock(&my_context->mutex_dyndump);
     dynarec_native_t* helper = (dynarec_native_t*)current_helper;
-    current_helper = NULL;
     if(helper) {
         memset(static_insts, 0, sizeof(static_insts));
         if(helper->dynablock && helper->dynablock->actual_block) {
@@ -412,6 +411,7 @@ void CancelBlock64(int need_lock)
             helper->dynablock->actual_block = NULL;
         }
     }
+    current_helper = NULL;
     if(need_lock)
         mutex_unlock(&my_context->mutex_dyndump);
 }