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
This commit is contained in:
Daniel Silverstone 2010-04-22 12:29:15 +00:00
parent 3d31372b9d
commit 7eef1a387a

View File

@ -356,7 +356,17 @@ nserror hlcache_llcache_callback(llcache_handle *handle,
ctx->accepted_types, &type)) { ctx->accepted_types, &type)) {
error = hlcache_find_content(ctx); error = hlcache_find_content(ctx);
if (error != NSERROR_OK) { 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); free(ctx);
return error; return error;
} }