Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
351730e2
Commit
351730e2
authored
Jan 26, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Check for NULL pointers in SetCurrentViewport.
parent
8e6e420a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
device.c
dlls/ddraw/device.c
+9
-2
No files found.
dlls/ddraw/device.c
View file @
351730e2
...
...
@@ -1703,9 +1703,15 @@ static HRESULT WINAPI d3d_device3_SetCurrentViewport(IDirect3DDevice3 *iface, ID
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
Direct3DViewport3
);
if
(
!
vp
)
{
WARN
(
"Direct3DViewport3 is NULL, returning DDERR_INVALIDPARAMS
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
wined3d_mutex_lock
();
/* Do nothing if the specified viewport is the same as the current one */
if
(
This
->
current_viewport
==
vp
)
if
(
This
->
current_viewport
==
vp
)
{
wined3d_mutex_unlock
();
return
D3D_OK
;
...
...
@@ -1745,7 +1751,8 @@ static HRESULT WINAPI d3d_device2_SetCurrentViewport(IDirect3DDevice2 *iface, ID
TRACE
(
"iface %p, viewport %p.
\n
"
,
iface
,
viewport
);
return
d3d_device3_SetCurrentViewport
(
&
device
->
IDirect3DDevice3_iface
,
&
vp
->
IDirect3DViewport3_iface
);
return
d3d_device3_SetCurrentViewport
(
&
device
->
IDirect3DDevice3_iface
,
vp
?
&
vp
->
IDirect3DViewport3_iface
:
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