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
972dc565
Commit
972dc565
authored
Mar 14, 2018
by
Matteo Bruni
Committed by
Alexandre Julliard
Mar 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Skip AddRef + Release if SetValue is called with the old texture.
Signed-off-by:
Matteo Bruni
<
mbruni@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32ffef33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
effect.c
dlls/d3dx9_36/effect.c
+9
-6
No files found.
dlls/d3dx9_36/effect.c
View file @
972dc565
...
...
@@ -1555,13 +1555,16 @@ static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base,
case
D3DXPT_TEXTURECUBE
:
for
(
i
=
0
;
i
<
(
param
->
element_count
?
param
->
element_count
:
1
);
++
i
)
{
IUnknown
*
unk
=
((
IUnknown
**
)
data
)[
i
];
if
(
unk
)
IUnknown_AddRef
(
unk
);
IUnknown
*
old_texture
=
((
IUnknown
**
)
param
->
data
)[
i
];
IUnknown
*
new_texture
=
((
IUnknown
**
)
data
)[
i
];
unk
=
((
IUnknown
**
)
param
->
data
)[
i
];
if
(
unk
)
IUnknown_Release
(
unk
);
if
(
new_texture
==
old_texture
)
continue
;
if
(
new_texture
)
IUnknown_AddRef
(
new_texture
);
if
(
old_texture
)
IUnknown_Release
(
old_texture
);
}
/* fallthrough */
case
D3DXPT_VOID
:
...
...
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