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
c448c5cf
Commit
c448c5cf
authored
Feb 13, 2000
by
Matthew Cline
Committed by
Alexandre Julliard
Feb 13, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check that ci->hWindowMenu is not zero before using it.
parent
53ec9f32
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mdi.c
windows/mdi.c
+6
-2
No files found.
windows/mdi.c
View file @
c448c5cf
...
...
@@ -3,7 +3,8 @@
* Copyright 1994, Bob Amstadt
* 1995,1996 Alex Korobka
*
* This file contains routines to support MDI features.
* This file contains routines to support MDI (Multiple Document
* Interface) features .
*
* Notes: Fairly complete implementation. Any volunteers for
* "More windows..." stuff?
...
...
@@ -342,6 +343,7 @@ static HWND MDICreateChild( WND *w, MDICLIENTINFO *ci, HWND parent,
}
/* this menu is needed to set a check mark in MDI_ChildActivate */
if
(
ci
->
hWindowMenu
!=
0
)
AppendMenuA
(
ci
->
hWindowMenu
,
MF_STRING
,
wIDmenu
,
lpstrDef
);
ci
->
nActiveChildren
++
;
...
...
@@ -1116,6 +1118,7 @@ LRESULT WINAPI MDIClientWndProc( HWND hwnd, UINT message, WPARAM wParam,
}
MDI_UpdateFrameText
(
frameWnd
,
hwnd
,
MDI_NOFRAMEREPAINT
,
frameWnd
->
text
);
if
(
ci
->
hWindowMenu
!=
0
)
AppendMenuA
(
ci
->
hWindowMenu
,
MF_SEPARATOR
,
0
,
NULL
);
GetClientRect
(
frameWnd
->
hwndSelf
,
&
rect
);
...
...
@@ -1131,7 +1134,8 @@ LRESULT WINAPI MDIClientWndProc( HWND hwnd, UINT message, WPARAM wParam,
case
WM_DESTROY
:
if
(
ci
->
hwndChildMaximized
)
MDI_RestoreFrameMenu
(
w
->
parent
,
ci
->
hwndChildMaximized
);
if
((
nItems
=
GetMenuItemCount
(
ci
->
hWindowMenu
))
>
0
)
if
((
ci
->
hWindowMenu
!=
0
)
&&
(
nItems
=
GetMenuItemCount
(
ci
->
hWindowMenu
))
>
0
)
{
ci
->
idFirstChild
=
nItems
-
1
;
ci
->
nActiveChildren
++
;
/* to delete a separator */
...
...
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