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
c09f1357
Commit
c09f1357
authored
Feb 03, 2009
by
Paul TBBle Hampson
Committed by
Alexandre Julliard
Feb 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winefile: Don't use child after it has been freed.
If winefile is unable to create a window, it frees the child pointer. However, it then proceeds to use the child pointer.
parent
aacbe97a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
winefile.c
programs/winefile/winefile.c
+12
-5
No files found.
programs/winefile/winefile.c
View file @
c09f1357
...
...
@@ -4706,7 +4706,7 @@ static void InitInstance(HINSTANCE hinstance)
}
static
void
show_frame
(
HWND
hwndParent
,
int
cmdshow
,
LPCTSTR
path
)
static
BOOL
show_frame
(
HWND
hwndParent
,
int
cmdshow
,
LPCTSTR
path
)
{
static
const
TCHAR
sMDICLIENT
[]
=
{
'M'
,
'D'
,
'I'
,
'C'
,
'L'
,
'I'
,
'E'
,
'N'
,
'T'
,
'\0'
};
...
...
@@ -4718,7 +4718,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
CLIENTCREATESTRUCT
ccs
;
if
(
Globals
.
hMainWnd
)
return
;
return
TRUE
;
opts
=
load_registry_settings
();
hMenuFrame
=
LoadMenu
(
Globals
.
hInstance
,
MAKEINTRESOURCE
(
IDM_WINEFILE
));
...
...
@@ -4796,8 +4796,10 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
child
->
pos
.
rcNormalPosition
.
right
=
320
;
child
->
pos
.
rcNormalPosition
.
bottom
=
280
;
if
(
!
create_child_window
(
child
))
if
(
!
create_child_window
(
child
))
{
HeapFree
(
GetProcessHeap
(),
0
,
child
);
return
FALSE
;
}
SetWindowPlacement
(
child
->
hwnd
,
&
child
->
pos
);
...
...
@@ -4807,7 +4809,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
UpdateWindow
(
Globals
.
hMainWnd
);
if
(
path
&&
path
[
0
])
if
(
child
->
hwnd
&&
path
&&
path
[
0
])
{
int
index
,
count
;
TCHAR
drv
[
_MAX_DRIVE
+
1
],
dir
[
_MAX_DIR
],
name
[
_MAX_FNAME
],
ext
[
_MAX_EXT
];
...
...
@@ -4835,6 +4837,7 @@ static void show_frame(HWND hwndParent, int cmdshow, LPCTSTR path)
}
}
}
return
TRUE
;
}
static
void
ExitInstance
(
void
)
...
...
@@ -4888,7 +4891,11 @@ static int winefile_main(HINSTANCE hinstance, int cmdshow, LPCTSTR path)
InitInstance
(
hinstance
);
show_frame
(
0
,
cmdshow
,
path
);
if
(
!
show_frame
(
0
,
cmdshow
,
path
)
)
{
ExitInstance
();
return
1
;
}
while
(
GetMessage
(
&
msg
,
0
,
0
,
0
))
{
if
(
Globals
.
hmdiclient
&&
TranslateMDISysAccel
(
Globals
.
hmdiclient
,
&
msg
))
...
...
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