Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
57239e78
Commit
57239e78
authored
Feb 13, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use get_handler_vector in detach_event.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3fcb5a0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
htmlevent.c
dlls/mshtml/htmlevent.c
+8
-12
No files found.
dlls/mshtml/htmlevent.c
View file @
57239e78
...
...
@@ -1539,9 +1539,9 @@ HRESULT attach_event(EventTarget *event_target, BSTR name, IDispatch *disp, VARI
HRESULT
detach_event
(
EventTarget
*
event_target
,
BSTR
name
,
IDispatch
*
disp
)
{
event_target_t
*
data
;
handler_vector_t
*
handler_vector
;
eventid_t
eid
;
DWORD
i
=
0
;
unsigned
i
;
eid
=
attr_to_eid
(
name
);
if
(
eid
==
EVENTID_LAST
)
{
...
...
@@ -1549,19 +1549,15 @@ HRESULT detach_event(EventTarget *event_target, BSTR name, IDispatch *disp)
return
S_OK
;
}
data
=
get_event_target_data
(
event_target
,
FALSE
);
if
(
!
data
)
return
S_OK
;
if
(
!
data
->
event_table
[
eid
])
handler_vector
=
get_handler_vector
(
event_target
,
eid
,
FALSE
);
if
(
!
handler_vector
)
return
S_OK
;
while
(
i
<
data
->
event_table
[
eid
]
->
handler_cnt
)
{
if
(
data
->
event_table
[
eid
]
->
handlers
[
i
]
==
disp
)
{
IDispatch_Release
(
data
->
event_table
[
eid
]
->
handlers
[
i
]);
data
->
event_table
[
eid
]
->
handlers
[
i
]
=
NULL
;
for
(
i
=
0
;
i
<
handler_vector
->
handler_cnt
;
i
++
)
{
if
(
handler_vector
->
handlers
[
i
]
==
disp
)
{
IDispatch_Release
(
handler_vector
->
handlers
[
i
]);
handler_vector
->
handlers
[
i
]
=
NULL
;
}
i
++
;
}
return
S_OK
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment