Jacek Caban : mshtml: Use stored nsdoc in createTextNode.
Alexandre Julliard
julliard at winehq.org
Thu Oct 9 07:42:49 CDT 2008
Module: wine
Branch: master
Commit: 4f08c4f09b7a772ef1c79d8e7d0d83f13c3fb4ef
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4f08c4f09b7a772ef1c79d8e7d0d83f13c3fb4ef
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Oct 8 13:29:39 2008 -0500
mshtml: Use stored nsdoc in createTextNode.
---
dlls/mshtml/htmldoc3.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmldoc3.c b/dlls/mshtml/htmldoc3.c
index 8c60290..2dc5a58 100644
--- a/dlls/mshtml/htmldoc3.c
+++ b/dlls/mshtml/htmldoc3.c
@@ -103,7 +103,6 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
IHTMLDOMNode **newTextNode)
{
HTMLDocument *This = HTMLDOC3_THIS(iface);
- nsIDOMDocument *nsdoc;
nsIDOMText *nstext;
HTMLDOMNode *node;
nsAString text_str;
@@ -111,12 +110,14 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
TRACE("(%p)->(%s %p)\n", This, debugstr_w(text), newTextNode);
- nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
+ if(!This->nsdoc) {
+ WARN("NULL nsdoc\n");
+ return E_UNEXPECTED;
+ }
nsAString_Init(&text_str, text);
- nsres = nsIDOMDocument_CreateTextNode(nsdoc, &text_str, &nstext);
+ nsres = nsIDOMHTMLDocument_CreateTextNode(This->nsdoc, &text_str, &nstext);
nsAString_Finish(&text_str);
- nsIDOMDocument_Release(nsdoc);
if(NS_FAILED(nsres)) {
ERR("CreateTextNode failed: %08x\n", nsres);
return E_FAIL;
More information about the wine-cvs
mailing list