summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dicache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dicache.c b/src/dicache.c
index 39d89509..82043590 100644
--- a/src/dicache.c
+++ b/src/dicache.c
@@ -224,6 +224,8 @@ void a_Dicache_unref(const DilloUrl *Url, int version)
if (entry->RefCount > 0) --entry->RefCount;
if (entry->v_imgbuf == NULL ||
(entry->RefCount == 0 && a_Imgbuf_last_reference(entry->v_imgbuf)))
+ if (entry->RefCount == 0 &&
+ (!entry->v_imgbuf || a_Imgbuf_last_reference(entry->v_imgbuf)))
Dicache_remove(Url, version);
}
}