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

This commit is contained in:
Jacek Caban 2007-09-19 13:33:03 +02:00 committed by Alexandre Julliard
parent 271049ca09
commit acae71ddf5
1 changed files with 4 additions and 2 deletions

View File

@ -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));