Jacek Caban : mshtml: Use stored nsdoc in IHTMLDocument2::createElement.
Alexandre Julliard
julliard at winehq.org
Thu Oct 9 07:42:49 CDT 2008
Module: wine
Branch: master
Commit: 9fbc40f8bb48a5fb64427b386aa38cde4fdc6432
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9fbc40f8bb48a5fb64427b386aa38cde4fdc6432
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed Oct 8 13:29:16 2008 -0500
mshtml: Use stored nsdoc in IHTMLDocument2::createElement.
---
dlls/mshtml/htmldoc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index 07602d9..e48e1df 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -897,7 +897,6 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
IHTMLElement **newElem)
{
HTMLDocument *This = HTMLDOC_THIS(iface);
- nsIDOMDocument *nsdoc;
nsIDOMElement *nselem;
HTMLElement *elem;
nsAString tag_str;
@@ -905,12 +904,14 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
TRACE("(%p)->(%s %p)\n", This, debugstr_w(eTag), newElem);
- nsIWebNavigation_GetDocument(This->nscontainer->navigation, &nsdoc);
+ if(!This->nsdoc) {
+ WARN("NULL nsdoc\n");
+ return E_UNEXPECTED;
+ }
nsAString_Init(&tag_str, eTag);
- nsres = nsIDOMDocument_CreateElement(nsdoc, &tag_str, &nselem);
+ nsres = nsIDOMDocument_CreateElement(This->nsdoc, &tag_str, &nselem);
nsAString_Finish(&tag_str);
- nsIDOMDocument_Release(nsdoc);
if(NS_FAILED(nsres)) {
ERR("CreateElement failed: %08x\n", nsres);
return E_FAIL;
More information about the wine-cvs
mailing list