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
f85def77
Commit
f85def77
authored
Aug 22, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Use safer method to set per-factory EUDC collection reference.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
db999065
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
main.c
dlls/dwrite/main.c
+14
-5
No files found.
dlls/dwrite/main.c
View file @
f85def77
...
...
@@ -1272,10 +1272,20 @@ static HRESULT WINAPI dwritefactory1_GetEudcFontCollection(IDWriteFactory5 *ifac
if
(
This
->
eudc_collection
)
IDWriteFontCollection1_AddRef
(
This
->
eudc_collection
);
else
hr
=
get_eudc_fontcollection
(
iface
,
&
This
->
eudc_collection
);
else
{
IDWriteFontCollection1
*
eudc_collection
;
if
(
FAILED
(
hr
=
get_eudc_fontcollection
(
iface
,
&
eudc_collection
)))
{
*
collection
=
NULL
;
WARN
(
"Failed to get EUDC collection, hr %#x.
\n
"
,
hr
);
return
hr
;
}
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
This
->
eudc_collection
,
eudc_collection
,
NULL
))
IDWriteFontCollection1_Release
(
eudc_collection
);
}
*
collection
=
(
IDWriteFontCollection
*
)
This
->
eudc_collection
;
*
collection
=
(
IDWriteFontCollection
*
)
This
->
eudc_collection
;
return
hr
;
}
...
...
@@ -1801,8 +1811,7 @@ void factory_detach_fontcollection(IDWriteFactory5 *iface, IDWriteFontCollection
{
struct
dwritefactory
*
factory
=
impl_from_IDWriteFactory5
(
iface
);
InterlockedCompareExchangePointer
((
void
**
)
&
factory
->
system_collection
,
NULL
,
collection
);
if
(
factory
->
eudc_collection
==
collection
)
factory
->
eudc_collection
=
NULL
;
InterlockedCompareExchangePointer
((
void
**
)
&
factory
->
eudc_collection
,
NULL
,
collection
);
IDWriteFactory5_Release
(
iface
);
}
...
...
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