Gabriel Ivăncescu : jscript: Fix refcounting the object prototype fallback.

Alexandre Julliard julliard at winehq.org
Tue Sep 7 16:25:19 CDT 2021


Module: wine
Branch: master
Commit: 59bb402bf1ff0a8492e910f6483b370a61d35f74
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=59bb402bf1ff0a8492e910f6483b370a61d35f74

Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date:   Mon Sep  6 20:01:59 2021 +0300

jscript: Fix refcounting the object prototype fallback.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 345bcd22020..e5d711a0a53 100644
--- a/dlls/jscript/dispex.c
+++ b/dlls/jscript/dispex.c
@@ -1881,7 +1881,7 @@ HRESULT init_dispex_from_constr(jsdisp_t *dispex, script_ctx_t *ctx, const built
         if(is_object_instance(val) && get_object(val))
             prot = iface_to_jsdisp(get_object(val));
         else
-            prot = ctx->object_prototype;
+            prot = jsdisp_addref(ctx->object_prototype);
 
         jsval_release(val);
     }




More information about the wine-cvs mailing list