Fix some weird crashes. not real fix. more a workaround to prevent the crash(1201519)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2222
This commit is contained in:
parent
990701f420
commit
f3ef0ec55c
1 changed files with 6 additions and 3 deletions
|
@ -235,10 +235,13 @@ void CacheBlock::Clear(void) {
|
|||
}
|
||||
if (link[ind].to!=&link_blocks[ind]) {
|
||||
CacheBlock * * wherelink=&link[ind].to->link[ind].from;
|
||||
while (*wherelink!=this) {
|
||||
wherelink=&(*wherelink)->link[ind].next;
|
||||
while (*wherelink != this && *wherelink) {
|
||||
wherelink = &(*wherelink)->link[ind].next;
|
||||
}
|
||||
*wherelink=(*wherelink)->link[ind].next;
|
||||
if(*wherelink)
|
||||
*wherelink = (*wherelink)->link[ind].next;
|
||||
else
|
||||
LOG(LOG_CPU,LOG_ERROR)("Cache anomaly. please investigate");
|
||||
}
|
||||
} else
|
||||
cache_addunsedblock(this);
|
||||
|
|
Loading…
Add table
Reference in a new issue