Module: wine Branch: master Commit: a5028f1e26c2ab6ef8c947b5d8ba75f76bb7bd92 URL: https://gitlab.winehq.org/wine/wine/-/commit/a5028f1e26c2ab6ef8c947b5d8ba75f...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Mon Dec 4 17:27:57 2023 +0200
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
---
dlls/mshtml/htmldoc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c index 002d2553e4f..e37f04fee0b 100644 --- a/dlls/mshtml/htmldoc.c +++ b/dlls/mshtml/htmldoc.c @@ -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);