wined3d: Avoid crashing when ProcessVertices is called with NULL vertex declaration

Paul Chitescu paulc at
Mon Sep 4 11:02:42 CDT 2006

On Mon, 4 Sep 2006, H. Verbeet wrote:
> On 04/09/06, Paul Chitescu <pchitescu at> wrote:
> > Changelog: Avoid a segfault in IWineD3DDeviceImpl_ProcessVertices by checking
> > if SrcImpl (parameter pVertexDecl) is NULL.
> >
> > The function is called from dlls/d3d8/device.c
> > IDirect3DDevice8Impl_ProcessVertices with an explicit NULL as vertex
> > declaration parameter.
> >
> > Crash was observed in Age of Mythology Trial.
> >
> This doesn't look correct to me, the call does effectively nothing for d3d8 now.

Well, what do you thing it did before at the line
    if(SrcImpl->vbo) {
if SrcImpl is NULL?

I don't understand what the code does but every part of it depends on
having a non-NULL SrcImpl. I think screaming bloody murder but continuing
is better than crashing.

I agree that the code doesn't look good but at least testing can proceed 
past this point.

Paul Chitescu

More information about the wine-devel mailing list