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
65644170
Commit
65644170
authored
Nov 18, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Remove null pointer checks that can't fail.
parent
a542a13a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
11 deletions
+8
-11
font.c
dlls/dwrite/font.c
+8
-11
No files found.
dlls/dwrite/font.c
View file @
65644170
...
...
@@ -179,10 +179,8 @@ static inline void* get_fontface_cmap(struct dwrite_fontface *fontface)
static
void
release_font_data
(
struct
dwrite_font_data
*
data
)
{
int
i
;
if
(
!
data
)
return
;
i
=
InterlockedDecrement
(
&
data
->
ref
);
if
(
i
>
0
)
if
(
InterlockedDecrement
(
&
data
->
ref
)
>
0
)
return
;
for
(
i
=
DWRITE_INFORMATIONAL_STRING_NONE
;
i
<
sizeof
(
data
->
info_strings
)
/
sizeof
(
data
->
info_strings
[
0
]);
i
++
)
{
...
...
@@ -196,14 +194,13 @@ static void release_font_data(struct dwrite_font_data *data)
heap_free
(
data
);
}
static
VOID
_fre
e_fontfamily_data
(
struct
dwrite_fontfamily_data
*
data
)
static
void
releas
e_fontfamily_data
(
struct
dwrite_fontfamily_data
*
data
)
{
int
i
;
if
(
!
data
)
return
;
i
=
InterlockedDecrement
(
&
data
->
ref
);
if
(
i
>
0
)
if
(
InterlockedDecrement
(
&
data
->
ref
)
>
0
)
return
;
for
(
i
=
0
;
i
<
data
->
font_count
;
i
++
)
release_font_data
(
data
->
fonts
[
i
]);
heap_free
(
data
->
fonts
);
...
...
@@ -1060,7 +1057,7 @@ static ULONG WINAPI dwritefontfamily_Release(IDWriteFontFamily *iface)
if
(
!
ref
)
{
IDWriteFontCollection_Release
(
This
->
collection
);
_fre
e_fontfamily_data
(
This
->
data
);
releas
e_fontfamily_data
(
This
->
data
);
heap_free
(
This
);
}
...
...
@@ -1238,7 +1235,7 @@ static ULONG WINAPI dwritefontcollection_Release(IDWriteFontCollection *iface)
if
(
!
ref
)
{
for
(
i
=
0
;
i
<
This
->
family_count
;
i
++
)
_fre
e_fontfamily_data
(
This
->
family_data
[
i
]);
releas
e_fontfamily_data
(
This
->
family_data
[
i
]);
heap_free
(
This
->
family_data
);
heap_free
(
This
);
}
...
...
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