about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-05-28 22:26:21 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-05-28 22:26:39 +0200
commitf1dc84afeff5a204ef6e9024c85f7fc926dc6047 (patch)
tree448c85017f5aec99aba6bf7a075bc198349d1f07 /src
parent7cafe8311eb80bc2d3330e9572cf9447e727b9fb (diff)
downloadbox64-f1dc84afeff5a204ef6e9024c85f7fc926dc6047.tar.gz
box64-f1dc84afeff5a204ef6e9024c85f7fc926dc6047.zip
[DYNAREC] Fixed a rare case of crash when crrent block is invalid
Diffstat (limited to 'src')
-rwxr-xr-xsrc/dynarec/dynablock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dynarec/dynablock.c b/src/dynarec/dynablock.c
index 20f3bd04..140633d0 100755
--- a/src/dynarec/dynablock.c
+++ b/src/dynarec/dynablock.c
@@ -312,7 +312,7 @@ static dynablock_t* internalDBGetBlock(x64emu_t* emu, uintptr_t addr, uintptr_t
     // try the quickest way first: get parent of current and check if ok!
     dynablocklist_t *dynablocks = NULL;
     dynablock_t* block = NULL;
-    if(current) {
+    if(current && current->done && !current->gone) {
         dynablocks = current->parent;
         if(dynablocks && !(addr>=dynablocks->text && addr<(dynablocks->text+dynablocks->textsz)))
             dynablocks = NULL;