summaryrefslogtreecommitdiff
path: root/content/hlcache.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2014-11-05 23:44:31 +0000
committerVincent Sanders <vince@kyllikki.org>2014-11-05 23:44:31 +0000
commit8ec7ad053a9a291ea2619055b1ca1989d4c975b9 (patch)
treeaa7272b673e2062985667d87fcfe7e19f30eb239 /content/hlcache.c
parent4ca959f46baf18213bf5ded769d87c7f030d392f (diff)
downloadnetsurf-8ec7ad053a9a291ea2619055b1ca1989d4c975b9.tar.gz
netsurf-8ec7ad053a9a291ea2619055b1ca1989d4c975b9.tar.bz2
Make the fetching of a contents encoding generic.
The frontends previously had to use an html renderer API to get the encoding of a content. This also required the explicit checking of the contents type rather than using the existing content API to abstract this knowledge.
Diffstat (limited to 'content/hlcache.c')
-rw-r--r--content/hlcache.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/content/hlcache.c b/content/hlcache.c
index 8a7ffe9da..6cfcba328 100644
--- a/content/hlcache.c
+++ b/content/hlcache.c
@@ -718,10 +718,9 @@ nserror hlcache_handle_release(hlcache_handle *handle)
/* See hlcache.h for documentation */
struct content *hlcache_handle_get_content(const hlcache_handle *handle)
{
- assert(handle != NULL);
-
- if (handle->entry != NULL)
+ if ((handle != NULL) && (handle->entry != NULL)) {
return handle->entry->content;
+ }
return NULL;
}