From 07751840acd8d9a7af2c0ebb47fff5810c11d858 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 30 Sep 2014 10:30:33 +0200 Subject: [PATCH] mshtml: Use proper type for text node in exec_hyperlink. --- dlls/mshtml/editor.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/editor.c b/dlls/mshtml/editor.c index 14aab53294b..b059a953b51 100644 --- a/dlls/mshtml/editor.c +++ b/dlls/mshtml/editor.c @@ -1170,13 +1170,14 @@ static HRESULT exec_hyperlink(HTMLDocument *This, DWORD cmdexecopt, VARIANT *in, /* create an element with text of URL */ if (insert_link_at_caret) { - nsIDOMNode *text_node, *unused_node; + nsIDOMNode *unused_node; + nsIDOMText *text_node; - nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &ns_url, (nsIDOMText **)&text_node); + nsIDOMHTMLDocument_CreateTextNode(This->doc_node->nsdoc, &ns_url, &text_node); /* wrap the tags around the text element */ - nsIDOMHTMLElement_AppendChild(anchor_elem, text_node, &unused_node); - nsIDOMNode_Release(text_node); + nsIDOMHTMLElement_AppendChild(anchor_elem, (nsIDOMNode*)text_node, &unused_node); + nsIDOMText_Release(text_node); nsIDOMNode_Release(unused_node); } -- 2.11.4.GIT