mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
- make Cache_Flush catch errors before Cache_Flush, and hopefully
print useful debugging info
This commit is contained in:
parent
b7cbc15508
commit
82095df9cf
1 changed files with 6 additions and 1 deletions
|
@ -766,8 +766,13 @@ void
|
|||
Cache_Flush (void)
|
||||
{
|
||||
CACHE_WRITE_LOCK;
|
||||
while (cache_head.next != &cache_head)
|
||||
while (cache_head.next != &cache_head) {
|
||||
if (!cache_head.next->user->data)
|
||||
Sys_Error ("Cache_Flush: user/system out of sync for "
|
||||
"'%s' with %d size",
|
||||
cache_head.next->name, cache_head.next->size);
|
||||
Cache_RealFree (cache_head.next->user); // reclaim the space
|
||||
}
|
||||
CACHE_WRITE_UNLOCK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue