From acae71ddf59a42dd5169fb199f797537d0f2966e Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Wed, 19 Sep 2007 13:33:03 +0200 Subject: [PATCH] mshtml: Fixed IHTMLTxtRange::get_text implementation with no nsrange associated. --- dlls/mshtml/txtrange.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/txtrange.c b/dlls/mshtml/txtrange.c index b7c04f9ad9b..4e67af9fb2e 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));