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
01cd45cc
Commit
01cd45cc
authored
Jul 01, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Jul 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Add a helper to free button text.
parent
a29b6958
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
toolbar.c
dlls/comctl32/toolbar.c
+9
-6
No files found.
dlls/comctl32/toolbar.c
View file @
01cd45cc
...
...
@@ -353,6 +353,12 @@ static void set_stringT( TBUTTON_INFO *btn, const WCHAR *str, BOOL unicode )
set_string_index
(
btn
,
(
DWORD_PTR
)
str
,
unicode
);
}
static
void
free_string
(
TBUTTON_INFO
*
btn
)
{
set_string_index
(
btn
,
0
,
TRUE
);
}
/***********************************************************************
* TOOLBAR_CheckStyle
*
...
...
@@ -3224,8 +3230,7 @@ TOOLBAR_DeleteButton (TOOLBAR_INFO *infoPtr, INT nIndex)
if
(
infoPtr
->
nNumButtons
==
1
)
{
TRACE
(
" simple delete!
\n
"
);
if
(
TOOLBAR_ButtonHasString
(
infoPtr
->
buttons
))
Free
((
LPWSTR
)
infoPtr
->
buttons
[
0
].
iString
);
free_string
(
infoPtr
->
buttons
);
Free
(
infoPtr
->
buttons
);
infoPtr
->
buttons
=
NULL
;
infoPtr
->
nNumButtons
=
0
;
...
...
@@ -3246,8 +3251,7 @@ TOOLBAR_DeleteButton (TOOLBAR_INFO *infoPtr, INT nIndex)
(
infoPtr
->
nNumButtons
-
nIndex
)
*
sizeof
(
TBUTTON_INFO
));
}
if
(
TOOLBAR_ButtonHasString
(
&
oldButtons
[
nIndex
]))
Free
((
LPWSTR
)
oldButtons
[
nIndex
].
iString
);
free_string
(
oldButtons
+
nIndex
);
Free
(
oldButtons
);
}
...
...
@@ -5227,8 +5231,7 @@ TOOLBAR_Destroy (TOOLBAR_INFO *infoPtr)
/* delete button data */
for
(
i
=
0
;
i
<
infoPtr
->
nNumButtons
;
i
++
)
if
(
TOOLBAR_ButtonHasString
(
&
infoPtr
->
buttons
[
i
]))
Free
((
LPWSTR
)
infoPtr
->
buttons
[
i
].
iString
);
free_string
(
infoPtr
->
buttons
+
i
);
Free
(
infoPtr
->
buttons
);
/* delete strings */
...
...
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