diff --git a/dlls/mshtml/view.c b/dlls/mshtml/view.c
index bba0f230290..6bc5e929ca6 100644
--- a/dlls/mshtml/view.c
+++ b/dlls/mshtml/view.c
@@ -168,6 +168,9 @@ void notif_focus(HTMLDocument *This)
IOleControlSite *site;
HRESULT hres;
+ if(!This->client)
+ return;
+
hres = IOleClientSite_QueryInterface(This->client, &IID_IOleControlSite, (void**)&site);
if(FAILED(hres))
return;