Do not attempt to destroy contents that are still loading

svn path=/trunk/netsurf/; revision=11898
This commit is contained in:
John Mark Bell 2011-03-03 21:13:58 +00:00
parent c7605db9d5
commit b7893f85cd
3 changed files with 5 additions and 1 deletions

View File

@ -107,6 +107,7 @@ void content_remove_user(struct content *c,
uint32_t content_count_users(struct content *c);
bool content_matches_quirks(struct content *c, bool quirks);
bool content_is_shareable(struct content *c);
content_status content__get_status(struct content *c);
const struct llcache_handle *content_get_llcache_handle(struct content *c);

View File

@ -219,7 +219,6 @@ content_type content__get_type(struct content *c);
const char *content__get_mime_type(struct content *c);
const char *content__get_url(struct content *c);
const char *content__get_title(struct content *c);
content_status content__get_status(struct content *c);
const char *content__get_status_message(struct content *c);
int content__get_width(struct content *c);
int content__get_height(struct content *c);

View File

@ -378,6 +378,10 @@ void hlcache_clean(void)
if (entry->content == NULL)
continue;
if (content__get_status(entry->content) ==
CONTENT_STATUS_LOADING)
continue;
if (content_count_users(entry->content) != 0)
continue;