From f2ceadc6e6e6b7906400b6df84ac385d263cf394 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Tue, 12 Jan 2016 15:43:53 +0100 Subject: [PATCH] mshtml: Initialize dest VARIANT before VariantCopy call. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/htmlevent.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c index ad016b903f5..df2d9a43e28 100644 --- a/dlls/mshtml/htmlevent.c +++ b/dlls/mshtml/htmlevent.c @@ -1468,8 +1468,10 @@ HRESULT get_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var HRESULT hres; hres = dispex_get_dprop_ref(&event_target->dispex, event_info[eid].attr_name, FALSE, &v); - if(SUCCEEDED(hres) && V_VT(v) != VT_EMPTY) + if(SUCCEEDED(hres) && V_VT(v) != VT_EMPTY) { + V_VT(var) = VT_EMPTY; return VariantCopy(var, v); + } data = get_event_target_data(event_target, FALSE); if(data && data->event_table[eid] && data->event_table[eid]->handler_prop) {