From 7eef1a387a6f70d892e720932bf8da7a97dfbba4 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Thu, 22 Apr 2010 12:29:15 +0000 Subject: Ensure we propagate the error to our client, and then abort the llcache handle, should we fail to find a content when converting a nascent hlcache context into an object svn path=/trunk/netsurf/; revision=10453 --- content/hlcache.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'content/hlcache.c') diff --git a/content/hlcache.c b/content/hlcache.c index aedd57e80..49cceb0a2 100644 --- a/content/hlcache.c +++ b/content/hlcache.c @@ -356,7 +356,17 @@ nserror hlcache_llcache_callback(llcache_handle *handle, ctx->accepted_types, &type)) { error = hlcache_find_content(ctx); if (error != NSERROR_OK) { - free((char *) ctx->child.charset); + hlcache_event hlevent; + + hlevent.type = CONTENT_MSG_ERROR; + hlevent.data.error = messages_get("MiscError"); + + ctx->handle->cb(ctx->handle, &hlevent, + ctx->handle->pw); + + llcache_handle_abort(handle); + llcache_handle_release(handle); + free((char *) ctx->child.charset); free(ctx); return error; } -- cgit v1.2.3