diff options
-rw-r--r-- | render/html.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/render/html.c b/render/html.c index a4725cad1..b6515106e 100644 --- a/render/html.c +++ b/render/html.c @@ -423,6 +423,7 @@ html_process_encoding_change(struct content *c, const char *encoding; const char *source_data; unsigned long source_size; + union content_msg_data msg_data; /* Retrieve new encoding */ encoding = dom_hubbub_parser_get_encoding(html->parser, @@ -433,8 +434,6 @@ html_process_encoding_change(struct content *c, html->encoding = talloc_strdup(c, encoding); if (html->encoding == NULL) { - union content_msg_data msg_data; - msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -458,8 +457,6 @@ html_process_encoding_change(struct content *c, talloc_free(html->encoding); html->encoding = talloc_strdup(c, "Windows-1252"); if (html->encoding == NULL) { - union content_msg_data msg_data; - msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); return false; @@ -474,8 +471,6 @@ html_process_encoding_change(struct content *c, &html->document); if (html->parser == NULL) { - union content_msg_data msg_data; - /** @todo add a message callback function and pass the * parser errors back instead of everything being * OOM @@ -500,8 +495,6 @@ html_process_encoding_change(struct content *c, return true; } - union content_msg_data msg_data; - msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); |