summaryrefslogtreecommitdiff
path: root/src/cache.c
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-09-12 22:48:18 +0200
committerjcid <devnull@localhost>2008-09-12 22:48:18 +0200
commit1289d19d8b8ccebb8a67adaece6ca8b6a92d2ac8 (patch)
treed9a88a546225e809ba4fedb6bb1d5437d02575a6 /src/cache.c
parentb4a7fddab9a30824c5c2bdfdf24e969938e5ed4e (diff)
- Fixed a crash bug with repush and non-viewable content.
Diffstat (limited to 'src/cache.c')
-rw-r--r--src/cache.c10
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();