d3dx9_36: Release shader if getting constant table fails in D3DXCompileShader.

This commit is contained in:
Christian Costa 2013-07-23 08:20:30 +02:00 committed by Alexandre Julliard
parent 531f795623
commit a8728893b7
1 changed files with 7 additions and 0 deletions

View File

@ -368,7 +368,14 @@ HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO
function, profile, flags, 0, (ID3DBlob **)shader, (ID3DBlob **)error_msgs);
if (SUCCEEDED(hr) && constant_table)
{
hr = D3DXGetShaderConstantTable(ID3DXBuffer_GetBufferPointer(*shader), constant_table);
if (FAILED(hr))
{
ID3DXBuffer_Release(*shader);
*shader = NULL;
}
}
return hr;
}