diff --git a/dlls/mshtml/htmlbody.c b/dlls/mshtml/htmlbody.c
index e4bb1d06ad1..18a60418cee 100644
--- a/dlls/mshtml/htmlbody.c
+++ b/dlls/mshtml/htmlbody.c
@@ -434,6 +434,10 @@ static HRESULT WINAPI HTMLBodyElement_put_text(IHTMLBodyElement *iface, VARIANT
nsres = nsIDOMHTMLBodyElement_SetText(This->nsbody, &text);
nsAString_Finish(&text);
+ if(NS_FAILED(nsres)) {
+ ERR("SetText failed: %08x\n", nsres);
+ return E_FAIL;
+ }
return S_OK;
}