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
71c01bb9
Commit
71c01bb9
authored
Oct 15, 2008
by
Andrey Turkin
Committed by
Alexandre Julliard
Oct 15, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Do not try to close uninitialized handles.
parent
d6359edd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
registry.c
programs/wordpad/registry.c
+7
-6
No files found.
programs/wordpad/registry.c
View file @
71c01bb9
...
...
@@ -78,7 +78,7 @@ static LRESULT registry_get_handle(HKEY *hKey, LPDWORD action, LPCWSTR subKey)
void
registry_set_options
(
HWND
hMainWnd
)
{
HKEY
hKey
;
HKEY
hKey
=
0
;
DWORD
action
;
if
(
registry_get_handle
(
&
hKey
,
&
action
,
key_options
)
==
ERROR_SUCCESS
)
...
...
@@ -101,7 +101,7 @@ void registry_set_options(HWND hMainWnd)
void
registry_read_winrect
(
RECT
*
rc
)
{
HKEY
hKey
;
HKEY
hKey
=
0
;
DWORD
size
=
sizeof
(
RECT
);
if
(
registry_get_handle
(
&
hKey
,
0
,
key_options
)
!=
ERROR_SUCCESS
||
...
...
@@ -119,7 +119,7 @@ void registry_read_winrect(RECT* rc)
void
registry_read_maximized
(
DWORD
*
bMaximized
)
{
HKEY
hKey
;
HKEY
hKey
=
0
;
DWORD
size
=
sizeof
(
DWORD
);
if
(
registry_get_handle
(
&
hKey
,
0
,
key_options
)
!=
ERROR_SUCCESS
||
...
...
@@ -318,8 +318,8 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
(
lstrlenW
(
pFiles
[
i
])
+
1
)
*
sizeof
(
WCHAR
));
}
}
RegCloseKey
(
hKey
);
}
RegCloseKey
(
hKey
);
registry_read_filelist
(
hMainWnd
);
}
...
...
@@ -335,9 +335,10 @@ void registry_read_options(void)
if
(
registry_get_handle
(
&
hKey
,
0
,
key_options
)
!=
ERROR_SUCCESS
)
registry_read_pagemargins
(
NULL
);
else
{
registry_read_pagemargins
(
hKey
);
RegCloseKey
(
hKey
);
RegCloseKey
(
hKey
);
}
}
static
void
registry_read_formatopts
(
int
index
,
LPCWSTR
key
,
DWORD
barState
[],
DWORD
wordWrap
[])
...
...
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