1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

mshtml: Don't rely on the outer_window in document.mimeType.

This would have crashed on detached windows, and checking the navigation_start
time has the same effect except it's decoupled from the outer window.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2023-12-04 17:27:57 +02:00 committed by Alexandre Julliard
parent ecc54b84ad
commit a5028f1e26

View file

@ -1296,7 +1296,7 @@ static HRESULT WINAPI HTMLDocument_get_mimeType(IHTMLDocument2 *iface, BSTR *p)
*p = NULL;
if(This->window && This->window->base.outer_window->readystate == READYSTATE_UNINITIALIZED)
if(This->window && !This->window->navigation_start_time)
return (*p = SysAllocString(L"")) ? S_OK : E_FAIL;
nsAString_InitDepend(&nsstr, NULL);