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
1486bdd9
Commit
1486bdd9
authored
Apr 14, 2013
by
Rico Schüller
Committed by
Alexandre Julliard
Apr 15, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Don't assert on invalid IDirect3DBaseTexture8 interfaces.
parent
e187c4ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
texture.c
dlls/d3d8/texture.c
+14
-3
No files found.
dlls/d3d8/texture.c
View file @
1486bdd9
...
@@ -1155,9 +1155,20 @@ struct d3d8_texture *unsafe_impl_from_IDirect3DBaseTexture8(IDirect3DBaseTexture
...
@@ -1155,9 +1155,20 @@ struct d3d8_texture *unsafe_impl_from_IDirect3DBaseTexture8(IDirect3DBaseTexture
{
{
if
(
!
iface
)
if
(
!
iface
)
return
NULL
;
return
NULL
;
assert
(
iface
->
lpVtbl
==
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DTexture8_Vtbl
||
iface
->
lpVtbl
==
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DCubeTexture8_Vtbl
/* SetTexture() in particular doesn't do a lot of validation on the pointer
||
iface
->
lpVtbl
==
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DVolumeTexture8_Vtbl
);
* that gets passed in, and passing an invalid pointer works as long as the
* application doesn't try to actually render anything with it, so we print
* a WARN and return NULL instead of having the usual assert() here.
* One application affected by this is Fishdom 2. */
if
(
iface
->
lpVtbl
!=
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DTexture8_Vtbl
&&
iface
->
lpVtbl
!=
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DCubeTexture8_Vtbl
&&
iface
->
lpVtbl
!=
(
const
IDirect3DBaseTexture8Vtbl
*
)
&
Direct3DVolumeTexture8_Vtbl
)
{
WARN
(
"%p is not a valid IDirect3DBaseTexture8 interface.
\n
"
,
iface
);
return
NULL
;
}
return
CONTAINING_RECORD
(
iface
,
struct
d3d8_texture
,
IDirect3DBaseTexture8_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d8_texture
,
IDirect3DBaseTexture8_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