Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a8f89a2f
Commit
a8f89a2f
authored
Oct 17, 2009
by
Ričardas Barkauskas
Committed by
Alexandre Julliard
Oct 19, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/propsheet: Test and fix for crash processing PSM_INDEXTOHWND with no longer valid handle.
parent
1aee3595
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
propsheet.c
dlls/comctl32/propsheet.c
+2
-0
propsheet.c
dlls/comctl32/tests/propsheet.c
+7
-1
No files found.
dlls/comctl32/propsheet.c
View file @
a8f89a2f
...
...
@@ -2553,6 +2553,8 @@ static LRESULT PROPSHEET_IndexToHwnd(HWND hwndDlg, int iPageIndex)
{
PropSheetInfo
*
psInfo
=
GetPropW
(
hwndDlg
,
PropSheetInfoStr
);
TRACE
(
"(%p, %d)
\n
"
,
hwndDlg
,
iPageIndex
);
if
(
!
psInfo
)
return
0
;
if
(
iPageIndex
<
0
||
iPageIndex
>=
psInfo
->
nPages
)
{
WARN
(
"%d out of range.
\n
"
,
iPageIndex
);
return
0
;
...
...
dlls/comctl32/tests/propsheet.c
View file @
a8f89a2f
...
...
@@ -26,6 +26,7 @@
#include "wine/test.h"
static
HWND
parent
;
static
HWND
sheethwnd
;
static
LONG
active_page
=
-
1
;
...
...
@@ -40,12 +41,13 @@ static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
char
caption
[
256
];
GetWindowTextA
(
hwnd
,
caption
,
sizeof
(
caption
));
ok
(
!
strcmp
(
caption
,
"test caption"
),
"caption: %s
\n
"
,
caption
);
sheethwnd
=
hwnd
;
return
0
;
}
}
return
0
;
}
static
INT_PTR
CALLBACK
page_dlg_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
...
...
@@ -71,6 +73,10 @@ static INT_PTR CALLBACK page_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam,
return
FALSE
;
}
}
case
WM_NCDESTROY
:
ok
(
!
SendMessageA
(
sheethwnd
,
PSM_INDEXTOHWND
,
400
,
0
),
"Should always be 0
\n
"
);
return
TRUE
;
default:
return
FALSE
;
}
...
...
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