On 16/04/07, Stefan Dösinger <[EMAIL PROTECTED]> wrote:
I have hope that this fixes the converted decl issues finally(appart of
sorting the array, which will be another patch)


+    convertedDecls = HeapAlloc(GetProcessHeap(), 0, 
sizeof(IDirect3DVertexDeclaration9 *) * (This->numConvertedDecls + 1));
+    if(!convertedDecls) {
+        /* This will destroy it */
+        IDirect3DVertexDeclaration9_Release(pDecl);
+        return NULL;
+    }
+
+    memcpy(convertedDecls, This->convertedDecls, 
sizeof(IDirect3DVertexDeclaration9 *) * (This->numConvertedDecls));
+    HeapFree(GetProcessHeap(), 0, This->convertedDecls);
Growing the array by a single element each time looks a bit expensive.
Also note that you could use HeapReAlloc there.


Reply via email to