mshtml: Initialize dest VARIANT before VariantCopy call.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-01-12 15:43:53 +01:00 committed by Alexandre Julliard
parent 5910925728
commit f2ceadc6e6
1 changed files with 3 additions and 1 deletions

View File

@ -1468,8 +1468,10 @@ HRESULT get_event_handler(EventTarget *event_target, eventid_t eid, VARIANT *var
HRESULT hres; HRESULT hres;
hres = dispex_get_dprop_ref(&event_target->dispex, event_info[eid].attr_name, FALSE, &v); 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); return VariantCopy(var, v);
}
data = get_event_target_data(event_target, FALSE); data = get_event_target_data(event_target, FALSE);
if(data && data->event_table[eid] && data->event_table[eid]->handler_prop) { if(data && data->event_table[eid] && data->event_table[eid]->handler_prop) {