On Sun, Apr 1, 2012 at 10:43 PM, David Adam <david.adam.c...@gmail.com> wrote: > + *mesh = polygon; > + > + if (adjacency) > + { > + hr = D3DXCreateBuffer(3 * sides * sizeof(DWORD), &adjacency_tmp); > + if (FAILED(hr)) return hr;
You should release the polygon mesh. Also, you probably shouldn't touch *mesh when the function fails. -- Józef Kucia