Check to see if the vertex declaration is null before trying to
reference it.
This commit is contained in:
parent
8bfe1dca03
commit
1b578af404
|
@ -3522,7 +3522,9 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetVertexDeclaration(IWineD3DDevice* iface, IW
|
|||
TRACE("(%p) : pDecl=%p\n", This, pDecl);
|
||||
|
||||
/* TODO: what about recording stateblocks? */
|
||||
IWineD3DVertexDeclaration_AddRef(pDecl);
|
||||
if (NULL != pDecl) {
|
||||
IWineD3DVertexDeclaration_AddRef(pDecl);
|
||||
}
|
||||
if (NULL != This->updateStateBlock->vertexDecl) {
|
||||
IWineD3DVertexDeclaration_Release(This->updateStateBlock->vertexDecl);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue