Jacek Caban : mshtml: Fixed IHTMLTxtRange:: get_text implementation with no nsrange associated.

Alexandre Julliard julliard at winehq.org
Wed Sep 19 08:16:26 CDT 2007


Module: wine
Branch: master
Commit: acae71ddf59a42dd5169fb199f797537d0f2966e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=acae71ddf59a42dd5169fb199f797537d0f2966e

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Wed Sep 19 13:33:03 2007 +0200

mshtml: Fixed IHTMLTxtRange::get_text implementation with no nsrange associated.

---

 dlls/mshtml/txtrange.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c
index b7c04f9..4e67af9 100644
--- a/dlls/mshtml/txtrange.c
+++ b/dlls/mshtml/txtrange.c
@@ -903,12 +903,14 @@ static HRESULT WINAPI HTMLTxtRange_get_text(IHTMLTxtRange *iface, BSTR *p)
 
     TRACE("(%p)->(%p)\n", This, p);
 
+    *p = NULL;
+    if(!This->nsrange)
+        return S_OK;
+
     wstrbuf_init(&buf);
     range_to_string(This, &buf);
     if(buf.buf)
         *p = SysAllocString(buf.buf);
-    else
-        *p = NULL;
     wstrbuf_finish(&buf);
 
     TRACE("ret %s\n", debugstr_w(*p));




More information about the wine-cvs mailing list