diff options
author | jcid <devnull@localhost> | 2008-09-12 22:48:18 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-09-12 22:48:18 +0200 |
commit | 1289d19d8b8ccebb8a67adaece6ca8b6a92d2ac8 (patch) | |
tree | d9a88a546225e809ba4fedb6bb1d5437d02575a6 /src/cache.c | |
parent | b4a7fddab9a30824c5c2bdfdf24e969938e5ed4e (diff) |
- Fixed a crash bug with repush and non-viewable content.
Diffstat (limited to 'src/cache.c')
-rw-r--r-- | src/cache.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/cache.c b/src/cache.c index 36764b24..0aaa4b14 100644 --- a/src/cache.c +++ b/src/cache.c @@ -1123,10 +1123,12 @@ static void Cache_delayed_process_queue_callback(void *data) while ((entry = (CacheEntry_t *)dList_nth_data(DelayedQueue, 0))) { Cache_ref_data(entry); Cache_process_queue(entry); - Cache_unref_data(entry); - /* note that if Cache_process_queue removes the entry, - * the following dList_remove has no effect. */ - dList_remove(DelayedQueue, entry); + if (entry != dList_nth_data(DelayedQueue, 0)) { + /* Cache_process_queue() has removed the entry! */ + } else { + Cache_unref_data(entry); + dList_remove(DelayedQueue, entry); + } } DelayedQueueIdleId = 0; a_Timeout_remove(); |