mshtml: Check for This->frame.
diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index 326b0b0..afc3cc8 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -629,7 +629,8 @@
             call_set_active_object(This->ip_window, ACTOBJ(This));
 
         memset(&rcBorderWidths, 0, sizeof(rcBorderWidths));
-        IOleInPlaceFrame_SetBorderSpace(This->frame, &rcBorderWidths);
+        if (This->frame)
+            IOleInPlaceFrame_SetBorderSpace(This->frame, &rcBorderWidths);
     }
 
     return S_OK;