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
a2c2a83f
Commit
a2c2a83f
authored
Feb 15, 2001
by
James Hatheway
Committed by
Alexandre Julliard
Feb 15, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Send LVN_DELETEITEM notification first, to avoid crashes if the app
requests LVIF_PARAM with LISTVIEW_GetItem() during its LVN_DELETEITEM message handler.
parent
b9807b40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
listview.c
dlls/comctl32/listview.c
+11
-9
No files found.
dlls/comctl32/listview.c
View file @
a2c2a83f
...
...
@@ -3930,6 +3930,17 @@ static LRESULT LISTVIEW_DeleteItem(HWND hwnd, INT nItem)
LVITEMA
item
;
TRACE
(
"(hwnd=%x,nItem=%d)
\n
"
,
hwnd
,
nItem
);
/* First, send LVN_DELETEITEM notification. */
memset
(
&
nmlv
,
0
,
sizeof
(
NMLISTVIEW
));
nmlv
.
hdr
.
hwndFrom
=
hwnd
;
nmlv
.
hdr
.
idFrom
=
lCtrlId
;
nmlv
.
hdr
.
code
=
LVN_DELETEITEM
;
nmlv
.
iItem
=
nItem
;
SendMessageA
(
GetParent
(
hwnd
),
WM_NOTIFY
,
(
WPARAM
)
lCtrlId
,
(
LPARAM
)
&
nmlv
);
/* remove it from the selection range */
ZeroMemory
(
&
item
,
sizeof
(
LVITEMA
));
...
...
@@ -3973,15 +3984,6 @@ static LRESULT LISTVIEW_DeleteItem(HWND hwnd, INT nItem)
lpItem
=
(
LISTVIEW_ITEM
*
)
DPA_GetPtr
(
hdpaSubItems
,
0
);
if
(
lpItem
!=
NULL
)
{
/* send LVN_DELETEITEM notification */
nmlv
.
hdr
.
hwndFrom
=
hwnd
;
nmlv
.
hdr
.
idFrom
=
lCtrlId
;
nmlv
.
hdr
.
code
=
LVN_DELETEITEM
;
nmlv
.
iItem
=
nItem
;
nmlv
.
lParam
=
lpItem
->
lParam
;
SendMessageA
(
GetParent
(
hwnd
),
WM_NOTIFY
,
(
WPARAM
)
lCtrlId
,
(
LPARAM
)
&
nmlv
);
/* free item string */
if
((
lpItem
->
pszText
!=
NULL
)
&&
(
lpItem
->
pszText
!=
LPSTR_TEXTCALLBACKA
))
...
...
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