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
e1d23a33
Commit
e1d23a33
authored
May 17, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Handle null destination for GetItem().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
39cc1216
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
main.c
dlls/mfplat/main.c
+1
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+6
-0
No files found.
dlls/mfplat/main.c
View file @
e1d23a33
...
...
@@ -1112,7 +1112,7 @@ HRESULT attributes_GetItem(struct attributes *attributes, REFGUID key, PROPVARIA
EnterCriticalSection
(
&
attributes
->
cs
);
if
((
attribute
=
attributes_find_item
(
attributes
,
key
,
NULL
)))
hr
=
PropVariantCopy
(
value
,
&
attribute
->
value
)
;
hr
=
value
?
PropVariantCopy
(
value
,
&
attribute
->
value
)
:
S_OK
;
else
hr
=
MF_E_ATTRIBUTENOTFOUND
;
...
...
dlls/mfplat/tests/mfplat.c
View file @
e1d23a33
...
...
@@ -763,6 +763,12 @@ static void test_attributes(void)
PropVariantClear
(
&
ret_propvar
);
CHECK_ATTR_COUNT
(
attributes
,
1
);
hr
=
IMFAttributes_GetItem
(
attributes
,
&
DUMMY_GUID1
,
NULL
);
ok
(
hr
==
S_OK
,
"Item check failed, hr %#x.
\n
"
,
hr
);
hr
=
IMFAttributes_GetItem
(
attributes
,
&
DUMMY_GUID2
,
NULL
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"Unexpected hr %#x.
\n
"
,
hr
);
PropVariantInit
(
&
ret_propvar
);
ret_propvar
.
vt
=
MF_ATTRIBUTE_STRING
;
U
(
ret_propvar
).
pwszVal
=
NULL
;
...
...
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