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
28e9b3f4
Commit
28e9b3f4
authored
Oct 08, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Added parameter check for registering/unregistering collection loaders.
parent
4aea5ca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
main.c
dlls/dwrite/main.c
+8
-2
font.c
dlls/dwrite/tests/font.c
+6
-0
No files found.
dlls/dwrite/main.c
View file @
28e9b3f4
...
...
@@ -491,11 +491,14 @@ static HRESULT WINAPI dwritefactory_CreateCustomFontCollection(IDWriteFactory *i
static
HRESULT
WINAPI
dwritefactory_RegisterFontCollectionLoader
(
IDWriteFactory
*
iface
,
IDWriteFontCollectionLoader
*
loader
)
{
int
i
;
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
(
iface
);
int
i
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
loader
);
if
(
!
loader
)
return
E_INVALIDARG
;
for
(
i
=
0
;
i
<
This
->
loader_count
;
i
++
)
if
(
This
->
loaders
[
i
]
==
loader
)
return
DWRITE_E_ALREADYREGISTERED
;
...
...
@@ -527,11 +530,14 @@ static HRESULT WINAPI dwritefactory_RegisterFontCollectionLoader(IDWriteFactory
static
HRESULT
WINAPI
dwritefactory_UnregisterFontCollectionLoader
(
IDWriteFactory
*
iface
,
IDWriteFontCollectionLoader
*
loader
)
{
int
i
;
struct
dwritefactory
*
This
=
impl_from_IDWriteFactory
(
iface
);
int
i
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
loader
);
if
(
!
loader
)
return
E_INVALIDARG
;
for
(
i
=
0
;
i
<
This
->
loader_count
;
i
++
)
if
(
This
->
loaders
[
i
]
==
loader
)
break
;
if
(
i
==
This
->
loader_count
)
...
...
dlls/dwrite/tests/font.c
View file @
28e9b3f4
...
...
@@ -855,6 +855,12 @@ static void test_CustomFontCollection(void)
IDWriteFontCollectionLoader
collection2
=
{
&
dwritefontcollectionloadervtbl
};
HRESULT
hr
;
hr
=
IDWriteFactory_RegisterFontCollectionLoader
(
factory
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_UnregisterFontCollectionLoader
(
factory
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_RegisterFontCollectionLoader
(
factory
,
&
collection
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteFactory_RegisterFontCollectionLoader
(
factory
,
&
collection2
);
...
...
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