Christian Costa : d3dxof: Make sure This->buf. pdata is set to NULL before being used in case of error.