[PATCH] jscript: Check for null instance prototype.
Jacek Caban
jacek at codeweavers.com
Thu Mar 4 13:47:37 CST 2021
Hi Gabriel,
On 04/03/2021 15:34, Gabriel Ivăncescu wrote:
> The value can be a null instance, even if it has the object type, when it
> ends up copied within prop_get.
>
> Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
> ---
> dlls/jscript/dispex.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/dlls/jscript/dispex.c b/dlls/jscript/dispex.c
> index 5829ceb..9d0357e 100644
> --- a/dlls/jscript/dispex.c
> +++ b/dlls/jscript/dispex.c
> @@ -1853,7 +1853,7 @@ HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const built
> return hres;
> }
>
> - if(is_object_instance(val))
> + if(is_object_instance(val) && get_object(val))
> prot = iface_to_jsdisp(get_object(val));
The patch looks right, but it would be great to have a test. See
nullDisp usage in existing tests for an example.
Thanks,
Jacek
More information about the wine-devel
mailing list