Fwd: d3dx9_36 [patch 1/2, resent]: Implement D3DXCreatePolygon

Rico Schüller kgbricola at web.de
Tue Nov 8 06:25:50 CST 2011

Hi David,

- 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

- 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

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.cnrs at gmail.com>
> Date: 2011/10/30
> Subject: d3dx9_36 [patch 1/2, resent]: Implement D3DXCreatePolygon
> To: wine-patches<wine-patches at winehq.org>
> Fix a possible crash when calling D3DXCreateMeshFVF.
> A+
> David

More information about the wine-devel mailing list