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
b5dbd180
Commit
b5dbd180
authored
Jan 18, 2021
by
Haoyang Chen
Committed by
Alexandre Julliard
Jan 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/layout: Handle NULL format in CreateEllipsisTrimmingSign().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6ebbf619
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
layout.c
dlls/dwrite/layout.c
+3
-0
layout.c
dlls/dwrite/tests/layout.c
+5
-0
No files found.
dlls/dwrite/layout.c
View file @
b5dbd180
...
@@ -5361,6 +5361,9 @@ HRESULT create_trimmingsign(IDWriteFactory7 *factory, IDWriteTextFormat *format,
...
@@ -5361,6 +5361,9 @@ HRESULT create_trimmingsign(IDWriteFactory7 *factory, IDWriteTextFormat *format,
*
sign
=
NULL
;
*
sign
=
NULL
;
if
(
!
format
)
return
E_INVALIDARG
;
/* Validate reading/flow direction here, layout creation won't complain about
/* Validate reading/flow direction here, layout creation won't complain about
invalid combinations. */
invalid combinations. */
reading
=
IDWriteTextFormat_GetReadingDirection
(
format
);
reading
=
IDWriteTextFormat_GetReadingDirection
(
format
);
...
...
dlls/dwrite/tests/layout.c
View file @
b5dbd180
...
@@ -1321,6 +1321,11 @@ static void test_CreateEllipsisTrimmingSign(void)
...
@@ -1321,6 +1321,11 @@ static void test_CreateEllipsisTrimmingSign(void)
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
f
,
L"en-GB"
,
&
format
);
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
f
,
L"en-GB"
,
&
format
);
ok
(
hr
==
S_OK
,
"Failed to create text format, hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to create text format, hr %#x.
\n
"
,
hr
);
sign
=
(
void
*
)
0xdeadbeef
;
hr
=
IDWriteFactory_CreateEllipsisTrimmingSign
(
factory
,
NULL
,
&
sign
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
!
sign
,
"Unexpected pointer %p.
\n
"
,
sign
);
EXPECT_REF
(
format
,
1
);
EXPECT_REF
(
format
,
1
);
hr
=
IDWriteFactory_CreateEllipsisTrimmingSign
(
factory
,
format
,
&
sign
);
hr
=
IDWriteFactory_CreateEllipsisTrimmingSign
(
factory
,
format
,
&
sign
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
...
...
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