Commit a14674aa authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

mshtml: Avoid casts from COM objects to interfaces.

parent d39d1464
......@@ -400,7 +400,7 @@ static BOOL is_elem_name(HTMLElement *elem, LPCWSTR name)
static HRESULT get_item_idx(HTMLElementCollection *This, UINT idx, IDispatch **ret)
{
if(idx < This->len) {
*ret = (IDispatch*)This->elems[idx];
*ret = (IDispatch*)&This->elems[idx]->node.event_target.dispex.IDispatchEx_iface;
IDispatch_AddRef(*ret);
}
......
......@@ -1024,7 +1024,7 @@ void call_event_handlers(HTMLDocumentNode *doc, HTMLEventObj *event_obj, EventTa
int i;
V_VT(&arg) = VT_DISPATCH;
V_DISPATCH(&arg) = (IDispatch*)event_obj;
V_DISPATCH(&arg) = (IDispatch*)&event_obj->dispex.IDispatchEx_iface;
i = data->event_table[eid]->handler_cnt;
while(i--) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment