[PATCH] mshtml: add NULL check to avoid crashing due to Gecko bug
Jacek Caban
jacek at codeweavers.com
Mon Jun 1 10:47:08 CDT 2015
On 06/01/15 13:11, Indrek Altpere wrote:
> Fixes https://bugs.winehq.org/show_bug.cgi?id=34808
>
> There seems to be a known bug in Gecko engine that causes iframe with display:none contents to return NULL nsstyle from nsIDOMWindow_GetComputedStyle
> https://bugzilla.mozilla.org/show_bug.cgi?id=548397
> ---
> dlls/mshtml/htmlcurstyle.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/dlls/mshtml/htmlcurstyle.c b/dlls/mshtml/htmlcurstyle.c
> index 5f6cb35..f0b0d98 100644
> --- a/dlls/mshtml/htmlcurstyle.c
> +++ b/dlls/mshtml/htmlcurstyle.c
> @@ -1343,6 +1343,11 @@ HRESULT HTMLCurrentStyle_Create(HTMLElement *elem, IHTMLCurrentStyle **p)
> return E_FAIL;
> }
>
> + if(!nsstyle) {
> + ERR("GetComputedStyle returned NULL nsstyle\n");
> + return E_FAIL;
> + }
We could try to work around the problem in Gecko, but it's obviously
even better if it's fixed in Gecko. Anyway, if it fixes a bug I'm fine
with the patch as is.
Thanks,
Jacek
More information about the wine-devel
mailing list