[PATCH] jscript: Check for null instance prototype.

Gabriel Ivăncescu gabrielopcode at gmail.com
Thu Mar 4 08:34:13 CST 2021


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));
         jsval_release(val);
     }
-- 
2.30.0




More information about the wine-devel mailing list