[PATCH 7/8] ddraw: Don't check for NULL in GetCurrentViewport
Stefan Dösinger
stefan at codeweavers.com
Sat Jan 26 06:39:48 CST 2013
Native doesn't do this, it happily segfaults. In case no viewport is
assigned, native returns D3DERR_NOCURRENTVIEWPORT if the output pointer
is NULL.
---
dlls/ddraw/device.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
index eca9d69..6659735 100644
--- a/dlls/ddraw/device.c
+++ b/dlls/ddraw/device.c
@@ -1786,9 +1786,6 @@ static HRESULT WINAPI d3d_device3_GetCurrentViewport(IDirect3DDevice3 *iface, ID
TRACE("iface %p, viewport %p.\n", iface, viewport);
- if (!viewport)
- return DDERR_INVALIDPARAMS;
-
wined3d_mutex_lock();
if (!device->current_viewport)
{
--
1.7.12.4
More information about the wine-patches
mailing list