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
56753621
Commit
56753621
authored
Sep 19, 1999
by
Richard Cohen
Committed by
Alexandre Julliard
Sep 19, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect SetMenu from rogue menu handle.
GetMenu16 can just call GetMenu.
parent
55b92475
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
menu.c
controls/menu.c
+8
-11
No files found.
controls/menu.c
View file @
56753621
...
...
@@ -3859,17 +3859,7 @@ BOOL WINAPI SetSystemMenu( HWND hwnd, HMENU hMenu )
*/
HMENU16
WINAPI
GetMenu16
(
HWND16
hWnd
)
{
HMENU16
retvalue
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hWnd
);
if
(
wndPtr
&&
!
(
wndPtr
->
dwStyle
&
WS_CHILD
))
{
retvalue
=
(
HMENU16
)
wndPtr
->
wIDmenu
;
goto
END
;
}
retvalue
=
0
;
END:
WIN_ReleaseWndPtr
(
wndPtr
);
return
retvalue
;
return
(
HMENU16
)
GetMenu
(
hWnd
);
}
...
...
@@ -3910,6 +3900,13 @@ BOOL WINAPI SetMenu( HWND hWnd, HMENU hMenu )
TRACE
(
"(%04x, %04x);
\n
"
,
hWnd
,
hMenu
);
if
(
hMenu
&&
!
IsMenu
(
hMenu
))
{
WARN
(
"hMenu is not a menu handle
\n
"
);
return
FALSE
;
}
if
(
wndPtr
&&
!
(
wndPtr
->
dwStyle
&
WS_CHILD
))
{
if
(
GetCapture
()
==
hWnd
)
ReleaseCapture
();
...
...
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