Hi David,

Impl:
- Probably you may unlock and free the polygon when allocating the vertice/index fail, why do you need the vertice at all? Couldn't you just write directly to "data", since you're holding the lock anyway? - if locking fails, you're leaking the polygon memory, this happens for nearly all error checks
- the TRACE shouldn't contain "stub"
- there are some style issues

Test:
- it may be nice to test if polygon or ppBuffer are set to NULL on hr != D3D_OK or if they are untouched - Why are you creating a buffer ppBuffer at all? From your implementation it looks like it is done when using adjacency? Also I'd expect, when D3DXCreateBuffer fails, ppBuffer is NULL and the release at the end label would crash, even if it still has uninitialized memory. - there is an unlock for the vertexbuffer missing and you may check the return value from the unlock call
- there are some copy and paste mistakes
- I think a failing Lock*Buffer should also get a failing test, I wouldn't just print the skip. - I'd check the count from all Release calls, that way, you'd see if you forgot to release something

Hope this helps
Rico

Am 07.11.2011 20:58, schrieb David Adam:
Hello,

any problem with this patch
http://source.winehq.org/patches/data/80433

and this one
http://source.winehq.org/patches/data/80434

Thanks in advance

David

---------- Forwarded message ----------
From: David Adam<david.adam.c...@gmail.com>
Date: 2011/10/30
Subject: d3dx9_36 [patch 1/2, resent]: Implement D3DXCreatePolygon
To: wine-patches<wine-patc...@winehq.org>


Fix a possible crash when calling D3DXCreateMeshFVF.

A+

David






Reply via email to