Paul Gofman : mshtml: Handle NULL nsstyle in HTMLWindow7_getComputedStyle().
Module: wine Branch: master Commit: 362eed3ae30e17da64888407140334925499071c URL: https://source.winehq.org/git/wine.git/?a=commit;h=362eed3ae30e17da648884071... Author: Paul Gofman <pgofman(a)codeweavers.com> Date: Mon Jun 28 22:29:46 2021 +0300 mshtml: Handle NULL nsstyle in HTMLWindow7_getComputedStyle(). Signed-off-by: Paul Gofman <pgofman(a)codeweavers.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlwindow.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 4c57d457e41..0ca4cd6397e 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2364,6 +2364,13 @@ static HRESULT WINAPI HTMLWindow7_getComputedStyle(IHTMLWindow7 *iface, IHTMLDOM return E_FAIL; } + if (!nsstyle) + { + FIXME("nsIDOMWindow_GetComputedStyle returned NULL nsstyle.\n"); + *p = NULL; + return S_OK; + } + hres = create_computed_style(nsstyle, dispex_compat_mode(&This->inner_window->event_target.dispex), p); nsIDOMCSSStyleDeclaration_Release(nsstyle); return hres;
participants (1)
-
Alexandre Julliard