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
4ff220f9
Commit
4ff220f9
authored
Apr 29, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Reject setting a 0 material handle in d3d_viewport_SetBackground().
parent
91a615ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
25 deletions
+4
-25
viewport.c
dlls/ddraw/viewport.c
+4
-25
No files found.
dlls/ddraw/viewport.c
View file @
4ff220f9
...
...
@@ -524,39 +524,18 @@ static HRESULT WINAPI d3d_viewport_LightElements(IDirect3DViewport3 *iface,
return
DDERR_UNSUPPORTED
;
}
/*****************************************************************************
* IDirect3DViewport3::SetBackground
*
* Sets the background material
*
* Params:
* hMat: Handle from a IDirect3DMaterial interface
*
* Returns:
* D3D_OK on success
*
*****************************************************************************/
static
HRESULT
WINAPI
d3d_viewport_SetBackground
(
IDirect3DViewport3
*
iface
,
D3DMATERIALHANDLE
hMat
)
static
HRESULT
WINAPI
d3d_viewport_SetBackground
(
IDirect3DViewport3
*
iface
,
D3DMATERIALHANDLE
material
)
{
struct
d3d_viewport
*
viewport
=
impl_from_IDirect3DViewport3
(
iface
);
struct
d3d_material
*
m
;
TRACE
(
"iface %p, material %#x.
\n
"
,
iface
,
hMat
);
TRACE
(
"iface %p, material %#x.
\n
"
,
iface
,
material
);
wined3d_mutex_lock
();
if
(
!
hMat
)
{
viewport
->
background
=
NULL
;
TRACE
(
"Setting background to NULL
\n
"
);
wined3d_mutex_unlock
();
return
D3D_OK
;
}
m
=
ddraw_get_object
(
&
viewport
->
ddraw
->
d3ddevice
->
handle_table
,
hMat
-
1
,
DDRAW_HANDLE_MATERIAL
);
if
(
!
m
)
if
(
!
(
m
=
ddraw_get_object
(
&
viewport
->
ddraw
->
d3ddevice
->
handle_table
,
material
-
1
,
DDRAW_HANDLE_MATERIAL
)))
{
WARN
(
"Invalid material handle
.
\n
"
);
WARN
(
"Invalid material handle
%#x.
\n
"
,
material
);
wined3d_mutex_unlock
();
return
DDERR_INVALIDPARAMS
;
}
...
...
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