DXGL r540 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r539‎ | r540 | r541 >
Date:15:08, 20 September 2014
Author:admin
Status:new
Tags:
Comment:
When GetCurrentViewport fails, return NULL pointer.
Modified paths:
  • /ddraw/glDirect3DDevice.cpp (modified) (history)

Diff [purge]

Index: ddraw/glDirect3DDevice.cpp
@@ -1969,8 +1969,8 @@
19701970 TRACE_ENTER(2,14,this,14,lplpd3dViewport);
19711971 if(!this) TRACE_RET(HRESULT,23,DDERR_INVALIDOBJECT);
19721972 if(!lplpd3dViewport) TRACE_RET(HRESULT,23,DDERR_INVALIDPARAMS);
1973 - if(!currentviewport) TRACE_RET(HRESULT,23,D3DERR_NOCURRENTVIEWPORT);
19741973 *lplpd3dViewport = (LPDIRECT3DVIEWPORT3)currentviewport;
 1974+ if (!currentviewport) TRACE_RET(HRESULT, 23, D3DERR_NOCURRENTVIEWPORT);
19751975 glDirect3DViewport3_AddRef(currentviewport);
19761976 TRACE_VAR("*lplpd3dViewport",14,*lplpd3dViewport);
19771977 TRACE_EXIT(23,D3D_OK);